linux/drivers/infiniband/sw
Bernard Metzler a3c278807a RDMA/siw: Fix QP destroy to wait for all references dropped.
Delay QP destroy completion until all siw references to QP are
dropped. The calling RDMA core will free QP structure after
successful return from siw_qp_destroy() call, so siw must not
hold any remaining reference to the QP upon return.
A use-after-free was encountered in xfstest generic/460, while
testing NFSoRDMA. Here, after a TCP connection drop by peer,
the triggered siw_cm_work_handler got delayed until after
QP destroy call, referencing a QP which has already freed.

Fixes: 303ae1cdfd ("rdma/siw: application interface")
Reported-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
Link: https://lore.kernel.org/r/20220920082503.224189-1-bmt@zurich.ibm.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2022-09-20 21:23:52 +03:00
..
rdmavt Linux 5.18 2022-05-24 12:40:28 -03:00
rxe RDMA/rxe: convert pr_warn to pr_debug 2022-09-08 11:03:15 +03:00
siw RDMA/siw: Fix QP destroy to wait for all references dropped. 2022-09-20 21:23:52 +03:00
Makefile rdma/siw: addition to kernel build environment 2019-07-02 17:03:41 -03:00