From: "Bryan O'Sullivan" <bos@pathscale.com>
To: rdreier@cisco.com
Cc: linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: [PATCH 1 of 10] ipath - fix spinlock recursion bug
Date: Tue, 23 May 2006 11:32:29 -0700 [thread overview]
Message-ID: <bc968dacc8608566f4d2.1148409149@eng-12.pathscale.com> (raw)
In-Reply-To: <patchbomb.1148409148@eng-12.pathscale.com>
The local loopback path for RC can lock the rkey table lock without
blocking interrupts. The receive interrupt path can then call
ipath_rkey_ok() and deadlock. Remove the redundant lock.
Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
diff -r abcc41d46f4c -r bc968dacc860 drivers/infiniband/hw/ipath/ipath_keys.c
--- a/drivers/infiniband/hw/ipath/ipath_keys.c Tue May 23 11:29:11 2006 -0700
+++ b/drivers/infiniband/hw/ipath/ipath_keys.c Tue May 23 11:29:15 2006 -0700
@@ -136,9 +136,7 @@ int ipath_lkey_ok(struct ipath_lkey_tabl
ret = 1;
goto bail;
}
- spin_lock(&rkt->lock);
mr = rkt->table[(sge->lkey >> (32 - ib_ipath_lkey_table_size))];
- spin_unlock(&rkt->lock);
if (unlikely(mr == NULL || mr->lkey != sge->lkey)) {
ret = 0;
goto bail;
@@ -184,8 +182,6 @@ bail:
* @acc: access flags
*
* Return 1 if successful, otherwise 0.
- *
- * The QP r_rq.lock should be held.
*/
int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss,
u32 len, u64 vaddr, u32 rkey, int acc)
@@ -196,9 +192,7 @@ int ipath_rkey_ok(struct ipath_ibdev *de
size_t off;
int ret;
- spin_lock(&rkt->lock);
mr = rkt->table[(rkey >> (32 - ib_ipath_lkey_table_size))];
- spin_unlock(&rkt->lock);
if (unlikely(mr == NULL || mr->lkey != rkey)) {
ret = 0;
goto bail;
next prev parent reply other threads:[~2006-05-23 18:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-23 18:32 [PATCH 0 of 10] ipath patches for 2.6.17 Bryan O'Sullivan
2006-05-23 18:32 ` Bryan O'Sullivan [this message]
2006-05-23 21:09 ` [PATCH 1 of 10] ipath - fix spinlock recursion bug Roland Dreier
2006-05-23 21:26 ` Bryan O'Sullivan
2006-05-23 21:31 ` Roland Dreier
2006-05-24 14:45 ` Bryan O'Sullivan
2006-05-23 18:32 ` [PATCH 2 of 10] ipath - don't modify QP if changes fail Bryan O'Sullivan
2006-05-23 18:32 ` [PATCH 3 of 10] ipath - fix reporting of driver version to userspace Bryan O'Sullivan
2006-05-23 18:32 ` [PATCH 4 of 10] ipath - replace uses of LIST_POISON Bryan O'Sullivan
2006-05-23 18:32 ` [PATCH 5 of 10] ipath - fix NULL dereference during cleanup Bryan O'Sullivan
2006-05-23 18:32 ` [PATCH 6 of 10] ipath - enable GPIO interrupt on HT-460 Bryan O'Sullivan
2006-05-23 18:32 ` [PATCH 7 of 10] ipath - enable PE800 receive interrupts on user ports Bryan O'Sullivan
2006-05-23 18:32 ` [PATCH 8 of 10] ipath - register as IB device owner Bryan O'Sullivan
2006-05-23 18:32 ` [PATCH 9 of 10] ipath - fix null deref during rdma ops Bryan O'Sullivan
2006-05-23 18:32 ` [PATCH 10 of 10] ipath - deref correct pointer when using kernel SMA Bryan O'Sullivan
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=bc968dacc8608566f4d2.1148409149@eng-12.pathscale.com \
--to=bos@pathscale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=openib-general@openib.org \
--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 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).