diff options
author | Don Wood <donald.e.wood@intel.com> | 2009-09-06 05:36:36 +0200 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2009-09-06 05:36:36 +0200 |
commit | c4c3f279cd8e9cc1d3e2f364a27beadb2e69cda8 (patch) | |
tree | 30324ca5c323132e2e7d3beecdef84ee8ac4b610 /drivers/infiniband | |
parent | Linux 2.6.31-rc9 (diff) | |
download | linux-c4c3f279cd8e9cc1d3e2f364a27beadb2e69cda8.tar.xz linux-c4c3f279cd8e9cc1d3e2f364a27beadb2e69cda8.zip |
RDMA/nes: Update refcnt during disconnect
During termination, it is possible for the refcnt to go to zero while
the worker thread is posting events upward. This fix increments the
refcnt before the request is passed to the worker thread. The thread
decrements the refcnt when the request is completed.
Signed-off-by: Don Wood <donald.e.wood@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 114b802771ad..fe08eb57c99f 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -2456,6 +2456,7 @@ int nes_cm_disconn(struct nes_qp *nesqp) if (nesqp->disconn_pending == 0) { nesqp->disconn_pending++; spin_unlock_irqrestore(&nesqp->lock, flags); + nes_add_ref(&nesqp->ibqp); /* init our disconnect work element, to */ INIT_WORK(&nesqp->disconn_work, nes_disconnect_worker); @@ -2477,6 +2478,7 @@ static void nes_disconnect_worker(struct work_struct *work) nes_debug(NES_DBG_CM, "processing AEQE id 0x%04X for QP%u.\n", nesqp->last_aeq, nesqp->hwqp.qp_id); nes_cm_disconn_true(nesqp); + nes_rem_ref(&nesqp->ibqp); } |