From: Arjan van de Ven <arjan@infradead.org>
To: Roland Dreier <rdreier@cisco.com>
Cc: openib-general@openib.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IB/uverbs: Fix lockdep warning when QP is created with 2 CQs
Date: Wed, 16 Aug 2006 19:11:23 +0200 [thread overview]
Message-ID: <1155748283.3023.76.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <adau04ceim5.fsf@cisco.com>
On Wed, 2006-08-16 at 09:43 -0700, Roland Dreier wrote:
> Arjan, here's a case that disproves your rule of thumb that rwsems
> are equivalent to mutexes as far as correctness goes: you can't have
> an AB-BA deadlock with nested rwsems when using down_read(). In other
> words, the following:
>
> down_read(&lock_1);
> down_read(&lock_2);
> down_read(&lock_2);
> down_read(&lock_1);
>
> is perfectly safe
it's safe as long as you never ever do a down_write nested inside or
outside a down_read of any of these locks....
--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
prev parent reply other threads:[~2006-08-16 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-16 16:43 Roland Dreier
2006-08-16 17:11 ` Arjan van de Ven [this message]
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=1155748283.3023.76.camel@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--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
all inboxes | Powered by JetHome®