diff options
author | Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com> | 2007-01-19 16:50:10 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-01-22 20:03:55 -0500 |
commit | ce29d72cc737df3573854a4719f00385adf1c9a6 (patch) | |
tree | 63808fbb78bbcf27d6c098baea51df068c9faaa4 /drivers/infiniband/hw/ehca | |
parent | a20f3a6d7e67a8aee571fb04634a631ba59f6e92 (diff) |
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/hw/ehca')
-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 93995b658d9..6074c897f51 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) | |||
344 | unsigned long flags; | 344 | unsigned long flags; |
345 | 345 | ||
346 | spin_lock_irqsave(&ehca_cq_idr_lock, flags); | 346 | spin_lock_irqsave(&ehca_cq_idr_lock, flags); |
347 | while (my_cq->nr_callbacks) | 347 | while (my_cq->nr_callbacks) { |
348 | spin_unlock_irqrestore(&ehca_cq_idr_lock, flags); | ||
348 | yield(); | 349 | yield(); |
350 | spin_lock_irqsave(&ehca_cq_idr_lock, flags); | ||
351 | } | ||
349 | 352 | ||
350 | idr_remove(&ehca_cq_idr, my_cq->token); | 353 | idr_remove(&ehca_cq_idr, my_cq->token); |
351 | spin_unlock_irqrestore(&ehca_cq_idr_lock, flags); | 354 | spin_unlock_irqrestore(&ehca_cq_idr_lock, flags); |