Searched hist:dc202c57 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/infiniband/hw/efa/ |
H A D | efa_verbs.c | dc202c57 Tue Aug 22 03:27:25 CDT 2023 Yonatan Nachum <ynachum@amazon.com> 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 <mrgolin@amazon.com> Reviewed-by: Yossi Leybovich <sleybo@amazon.com> Signed-off-by: Yonatan Nachum <ynachum@amazon.com> Link: https://lore.kernel.org/r/20230822082725.31719-1-ynachum@amazon.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
|