* [PATCH 2.6.20 1/2] ehca: ehca_cq.c: fix unproper use of yield within spinlock context
@ 2007-01-19 21:50 Hoang-Nam Nguyen
2007-01-21 22:06 ` Roland Dreier
0 siblings, 1 reply; 2+ messages in thread
From: Hoang-Nam Nguyen @ 2007-01-19 21:50 UTC (permalink / raw)
To: Roland Dreier, linux-kernel, linuxppc-dev, openfabrics-ewg,
openib-general
Cc: raisch
Hello Roland!
This is a patch for ehca_cq.c that fixes unproper use of yield within
spinlock context.
Thanks
Nam
Signed-off-by Hoang-Nam Nguyen <hnguyen@de.ibm.com>
---
ehca_cq.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-21 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-19 21:50 [PATCH 2.6.20 1/2] ehca: ehca_cq.c: fix unproper use of yield within spinlock context Hoang-Nam Nguyen
2007-01-21 22:06 ` Roland Dreier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).