summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/i40iw/i40iw_hw.c
diff options
context:
space:
mode:
authorMustafa Ismail2016-12-06 22:49:30 +0100
committerDoug Ledford2016-12-12 23:20:26 +0100
commitf4a87ca12a1c203913a5cc889ec49b817a1f45fc (patch)
treefab49377163fae43144892789644e5ccc72cb0e1 /drivers/infiniband/hw/i40iw/i40iw_hw.c
parenti40iw: Use correct src address in memcpy to rdma stats counters (diff)
downloadkernel-qcow2-linux-f4a87ca12a1c203913a5cc889ec49b817a1f45fc.tar.gz
kernel-qcow2-linux-f4a87ca12a1c203913a5cc889ec49b817a1f45fc.tar.xz
kernel-qcow2-linux-f4a87ca12a1c203913a5cc889ec49b817a1f45fc.zip
i40iw: Fix double free of QP
A QP can be double freed if i40iw_cm_disconn() is called while it is currently being freed by i40iw_rem_ref(). The fix in i40iw_cm_disconn() will first check if the QP is already freed before making another request for the QP to be freed. Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com> Signed-off-by: Henry Orosco <henry.orosco@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw/i40iw_hw.c')
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_hw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_hw.c b/drivers/infiniband/hw/i40iw/i40iw_hw.c
index 5e2c16c725e3..b2854b11a240 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_hw.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_hw.c
@@ -308,7 +308,9 @@ void i40iw_process_aeq(struct i40iw_device *iwdev)
iwqp = iwdev->qp_table[info->qp_cq_id];
if (!iwqp) {
spin_unlock_irqrestore(&iwdev->qptable_lock, flags);
- i40iw_pr_err("qp_id %d is already freed\n", info->qp_cq_id);
+ i40iw_debug(dev, I40IW_DEBUG_AEQ,
+ "%s qp_id %d is already freed\n",
+ __func__, info->qp_cq_id);
continue;
}
i40iw_add_ref(&iwqp->ibqp);