public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iser-target: Fix possible use-after-free in connection establishment error
@ 2017-11-26 13:31 Sagi Grimberg
       [not found] ` <20171126133104.22710-1-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Sagi Grimberg @ 2017-11-26 13:31 UTC (permalink / raw)
  To: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA

In case we fail to establish the connection we must drain our pre-posted
login recieve work request before continuing safely with connection
teardown.

Reported-by: Amrani, Ram <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index ceabdb85df8b..9d4785ba24cb 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -741,6 +741,7 @@ isert_connect_error(struct rdma_cm_id *cma_id)
 {
 	struct isert_conn *isert_conn = cma_id->qp->qp_context;
 
+	ib_drain_qp(isert_conn->qp);
 	list_del_init(&isert_conn->node);
 	isert_conn->cm_id = NULL;
 	isert_put_conn(isert_conn);
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-01-14  9:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-26 13:31 [PATCH] iser-target: Fix possible use-after-free in connection establishment error Sagi Grimberg
     [not found] ` <20171126133104.22710-1-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-11-26 13:59   ` Sagi Grimberg
2017-11-28 11:51     ` Amrani, Ram
     [not found]     ` <3676820c-544e-8ced-859a-ade8e6a0ef53-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-11-29  5:55       ` Amrani, Ram
2017-11-29 22:46         ` Sagi Grimberg
2018-01-09 17:04           ` Max Gurtovoy
2018-01-09 17:17             ` Jason Gunthorpe
     [not found]               ` <20180109171718.GC4518-uk2M96/98Pc@public.gmane.org>
2018-01-10  7:42                 ` Amrani, Ram
2018-01-10 21:54               ` Doug Ledford
2018-01-13  5:46                 ` Nicholas A. Bellinger
2018-01-13 18:08                   ` Jason Gunthorpe
     [not found]                     ` <20180113180841.GB32353-uk2M96/98Pc@public.gmane.org>
2018-01-14  9:24                       ` Sagi Grimberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox