summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorYonatan Cohen <yonatanc@mellanox.com>2017-01-19 15:25:59 +0200
committerDoug Ledford <dledford@redhat.com>2017-01-24 16:17:32 -0500
commit2d4b21e0a2913612274a69a3ba1bfee4cffc6e77 (patch)
tree595ca21e04b7db8f27e5e178753ff1b0ba677e77 /drivers/infiniband
parentf39f775218a7520e3700de2003c84a042c3b5972 (diff)
downloadtalos-obmc-linux-2d4b21e0a2913612274a69a3ba1bfee4cffc6e77.tar.gz
talos-obmc-linux-2d4b21e0a2913612274a69a3ba1bfee4cffc6e77.zip
IB/rxe: Prevent from completer to operate on non valid QP
On UD QP completer tasklet is scheduled for each packet sent. If it is followed by a destroy_qp(), the kernel panic will happen as the completer tries to operate on a destroyed QP. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com> Reviewed-by: Moni Shoua <monis@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_qp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index 486d576e55bc..44b2108253bd 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -813,8 +813,7 @@ void rxe_qp_destroy(struct rxe_qp *qp)
del_timer_sync(&qp->rnr_nak_timer);
rxe_cleanup_task(&qp->req.task);
- if (qp_type(qp) == IB_QPT_RC)
- rxe_cleanup_task(&qp->comp.task);
+ rxe_cleanup_task(&qp->comp.task);
/* flush out any receive wr's or pending requests */
__rxe_do_task(&qp->req.task);
OpenPOWER on IntegriCloud