提交 6869e000 编写于 作者: B Bart Van Assche 提交者: Jason Gunthorpe

IB/srpt: Fix srpt_cm_req_recv() error path (2/2)

If a login request was received through the RDMA/CM and if an error occurs
during login, clear rdma_cm_id->context instead of ib_cm_id->context.

Fixes: 63cf1a90 ("IB/srpt: Add RDMA/CM support")
Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 847462de
......@@ -2360,8 +2360,11 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev,
srpt_free_ioctx_ring((struct srpt_ioctx **)ch->ioctx_ring,
ch->sport->sdev, ch->rq_size,
ch->max_rsp_size, DMA_TO_DEVICE);
free_ch:
if (ib_cm_id)
if (rdma_cm_id)
rdma_cm_id->context = NULL;
else
ib_cm_id->context = NULL;
kfree(ch);
ch = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册