aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorYonatan Nachum <[email protected]>2023-08-22 08:27:25 +0000
committerLeon Romanovsky <[email protected]>2023-08-22 17:21:53 +0300
commitdc202c57e9a1423aed528e4b8dc949509cd32191 (patch)
tree527d980c63cabd013f34174f02b3079641b6cd97 /lib/test_fortify/write_overflow-strncpy-src.c
parent9dfccb6d0d3d13347c61ff0136b22d5d772d2075 (diff)
RDMA/efa: Fix wrong resources deallocation order
When trying to destroy QP or CQ, we first decrease the refcount and potentially free memory regions allocated for the object and then request the device to destroy the object. If the device fails, the object isn't fully destroyed so the user/IB core can try to destroy the object again which will lead to underflow when trying to decrease an already zeroed refcount. Deallocate resources in reverse order of allocating them to safely free them. Fixes: ff6629f88c52 ("RDMA/efa: Do not delay freeing of DMA pages") Reviewed-by: Michael Margolin <[email protected]> Reviewed-by: Yossi Leybovich <[email protected]> Signed-off-by: Yonatan Nachum <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions