diff options
author | Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com> | 2007-01-19 22:50:10 +0100 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-01-22 17:03:55 -0800 |
commit | ce29d72cc737df3573854a4719f00385adf1c9a6 (patch) | |
tree | 63808fbb78bbcf27d6c098baea51df068c9faaa4 /drivers | |
parent | a20f3a6d7e67a8aee571fb04634a631ba59f6e92 (diff) | |
download | linux-stable-ce29d72cc737df3573854a4719f00385adf1c9a6.tar.gz linux-stable-ce29d72cc737df3573854a4719f00385adf1c9a6.tar.bz2 linux-stable-ce29d72cc737df3573854a4719f00385adf1c9a6.zip |
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')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_cq.c | 5 |
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 93995b658d94..6074c897f51c 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); |