summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/i40iw/i40iw_verbs.c
diff options
context:
space:
mode:
authorShiraz Saleem <shiraz.saleem@intel.com>2016-12-06 15:49:33 -0600
committerDoug Ledford <dledford@redhat.com>2016-12-12 17:20:28 -0500
commitd627b506313c887e7159580cde926f5d14797aaa (patch)
treeab165bbf44c04d624d994bb8ccc3457704f22feb /drivers/infiniband/hw/i40iw/i40iw_verbs.c
parentfd90d4d4c2dc815ef5a5f5d50a9c65c266c68ace (diff)
downloadop-kernel-dev-d627b506313c887e7159580cde926f5d14797aaa.zip
op-kernel-dev-d627b506313c887e7159580cde926f5d14797aaa.tar.gz
i40iw: Fix race condition in terminate timer's handler
Add a QP reference when terminate timer is started to ensure the destroy QP doesn't race ahead to free the QP while it is being referenced in the terminate timer's handler. Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw/i40iw_verbs.c')
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_verbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
index 206d72b..18526e6 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
@@ -959,7 +959,7 @@ int i40iw_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
goto exit;
}
if (iwqp->sc_qp.term_flags)
- del_timer(&iwqp->terminate_timer);
+ i40iw_terminate_del_timer(&iwqp->sc_qp);
info.next_iwarp_state = I40IW_QP_STATE_ERROR;
if ((iwqp->hw_tcp_state > I40IW_TCP_STATE_CLOSED) &&
iwdev->iw_status &&
OpenPOWER on IntegriCloud