]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/srp: Fix NULL deref at srp_destroy_qp()
authorIsrael Rukshin <israelr@mellanox.com>
Thu, 11 May 2017 15:52:36 +0000 (18:52 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 1 Jun 2017 21:20:10 +0000 (17:20 -0400)
commitb9b5c6bdb75f8fe53c506bf9986cd43ec614431c
tree449a5e34e8f365503eaa3104e887252e1125d436
parent7063fcec1dbbc079b1efcb6a34dc7bf0cc85c2e3
RDMA/srp: Fix NULL deref at srp_destroy_qp()

If srp_init_qp() fails at srp_create_ch_ib() then ch->send_cq
may be NULL.
Calling directly to ib_destroy_qp() is sufficient because
no work requests were posted on the created qp.

Fixes: 9a0443447117 ("IB/srp: Drain the send queue before destroying a QP")
Cc: <stable@vger.kernel.org>
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Bart van Assche <bart.vanassche@sandisk.com>--
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srp/ib_srp.c