Skip to content

Commit 699826f

Browse files
Saravanan Vajravelrleon
authored andcommitted
IB/isert: Fix incorrect release of isert connection
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: b02efbf ("iser-target: Fix implicit termination of connections") Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Saravanan Vajravel <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 7651e2d commit 699826f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/infiniband/ulp/isert/ib_isert.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,8 +2570,6 @@ static void isert_wait_conn(struct iscsit_conn *conn)
25702570
isert_put_unsol_pending_cmds(conn);
25712571
isert_wait4cmds(conn);
25722572
isert_wait4logout(isert_conn);
2573-
2574-
queue_work(isert_release_wq, &isert_conn->release_work);
25752573
}
25762574

25772575
static void isert_free_conn(struct iscsit_conn *conn)

0 commit comments

Comments
 (0)