From: Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>
To: Roland Dreier <rdreier@cisco.com>,
hch@infradead.org, linux-kernel@vger.kernel.org,
linuxppc-dev@ozlabs.org, openib-general@openib.org,
openfabrics-ewg@openib.org
Cc: raisch@de.ibm.com
Subject: [PATCH 2.6.21 1/4] ehca: fix improper use of yield with spinlock held
Date: Wed, 24 Jan 2007 00:10:36 +0100 [thread overview]
Message-ID: <200701240010.37540.hnguyen@linux.vnet.ibm.com> (raw)
Here is a patch for ehca_cq.c that fixes improper use of yield
with spinlock held.
Thanks
Nam
Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
---
ehca_cq.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
diff -Nurp infiniband_orig/drivers/infiniband/hw/ehca/ehca_cq.c infiniband_work/drivers/infiniband/hw/ehca/ehca_cq.c
--- infiniband_orig/drivers/infiniband/hw/ehca/ehca_cq.c 2007-01-19 19:40:32.000000000 +0100
+++ infiniband_work/drivers/infiniband/hw/ehca/ehca_cq.c 2007-01-20 00:15:34.000000000 +0100
@@ -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);
next reply other threads:[~2007-01-23 23:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-23 23:10 Hoang-Nam Nguyen [this message]
2007-01-26 2:50 ` [PATCH 2.6.21 1/4] ehca: fix improper use of yield with spinlock held Christoph Hellwig
2007-01-26 2:50 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200701240010.37540.hnguyen@linux.vnet.ibm.com \
--to=hnguyen@linux.vnet.ibm.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=openfabrics-ewg@openib.org \
--cc=openib-general@openib.org \
--cc=raisch@de.ibm.com \
--cc=rdreier@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.