summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorHoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>2007-01-19 22:50:10 +0100
committerRoland Dreier <rolandd@cisco.com>2007-01-22 17:03:55 -0800
commitce29d72cc737df3573854a4719f00385adf1c9a6 (patch)
tree63808fbb78bbcf27d6c098baea51df068c9faaa4 /drivers/infiniband
parenta20f3a6d7e67a8aee571fb04634a631ba59f6e92 (diff)
downloadop-kernel-dev-ce29d72cc737df3573854a4719f00385adf1c9a6.zip
op-kernel-dev-ce29d72cc737df3573854a4719f00385adf1c9a6.tar.gz
IB/ehca: Fix improper use of yield() with spinlock held
Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_cq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c
index 93995b6..6074c89 100644
--- a/drivers/infiniband/hw/ehca/ehca_cq.c
+++ b/drivers/infiniband/hw/ehca/ehca_cq.c
@@ -344,8 +344,11 @@ int ehca_destroy_cq(struct ib_cq *cq)
unsigned long flags;
spin_lock_irqsave(&ehca_cq_idr_lock, flags);
- while (my_cq->nr_callbacks)
+ while (my_cq->nr_callbacks) {
+ spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
yield();
+ spin_lock_irqsave(&ehca_cq_idr_lock, flags);
+ }
idr_remove(&ehca_cq_idr, my_cq->token);
spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
OpenPOWER on IntegriCloud