mirror-linux/drivers/infiniband
Saravanan Vajravel 277fbf63b3 IB/isert: Fix incorrect release of isert connection
[ Upstream commit 699826f4e3 ]

The ib_isert module is releasing the isert connection both in
isert_wait_conn() handler as well as isert_free_conn() handler.
In isert_wait_conn() handler, it is expected to wait for iSCSI
session logout operation to complete. It should free the isert
connection only in isert_free_conn() handler.

When a bunch of iSER target is cleared, this issue can lead to
use-after-free memory issue as isert conn is twice released

Fixes: b02efbfc9a ("iser-target: Fix implicit termination of connections")
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://lore.kernel.org/r/20230606102531.162967-4-saravanan.vajravel@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-21 16:01:00 +02:00
..
core IB/uverbs: Fix to consider event queue closing also upon non-blocking mode 2023-06-21 16:00:59 +02:00
hw RDMA/mlx5: Fix affinity assignment 2023-06-21 16:01:00 +02:00
sw RDMA/rxe: Fix the use-before-initialization error of resp_pkts 2023-06-21 16:00:59 +02:00
ulp IB/isert: Fix incorrect release of isert connection 2023-06-21 16:01:00 +02:00
Kconfig RDMA: Disable IB HW for UML 2022-12-31 13:32:36 +01:00
Makefile