diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2017-11-26 16:31:04 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-01-11 00:46:03 +0300 |
commit | cd52cb26e7ead5093635e98e07e221e4df482d34 (patch) | |
tree | f62ae4a0d8842b51f6b305c6a5ac3dcf7034e21d /drivers/infiniband/ulp/isert/ib_isert.c | |
parent | a1ffa4670cb97ae3a4b3e8535d88be5f643f7c3b (diff) | |
download | linux-cd52cb26e7ead5093635e98e07e221e4df482d34.tar.xz |
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: a060b5629ab0 ("IB/core: generic RDMA READ/WRITE API")
Cc: <stable@vger.kernel.org> # 4.7+
Reported-by: Amrani, Ram <Ram.Amrani@cavium.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/isert/ib_isert.c')
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 720dfb3a1ac2..1b02283ce20e 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); |