Skip to content

Commit cd52cb2

Browse files
sagigrimbergdledford
authored andcommitted
iser-target: Fix possible use-after-free in connection establishment error
In case we fail to establish the connection we must drain our pre-posted login recieve work request before continuing safely with connection teardown. Fixes: a060b56 ("IB/core: generic RDMA READ/WRITE API") Cc: <[email protected]> # 4.7+ Reported-by: Amrani, Ram <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent a1ffa46 commit cd52cb2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/infiniband/ulp/isert/ib_isert.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,7 @@ isert_connect_error(struct rdma_cm_id *cma_id)
741741
{
742742
struct isert_conn *isert_conn = cma_id->qp->qp_context;
743743

744+
ib_drain_qp(isert_conn->qp);
744745
list_del_init(&isert_conn->node);
745746
isert_conn->cm_id = NULL;
746747
isert_put_conn(isert_conn);

0 commit comments

Comments
 (0)