From: Arjan van de Ven <arjan@linux.intel.com>
To: Pavel Emelianov <xemul@sw.ru>
Cc: Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Lockdep treats down_write_trylock like regular down_write
Date: Mon, 09 Apr 2007 08:09:39 -0700 [thread overview]
Message-ID: <461A5733.3080303@linux.intel.com> (raw)
In-Reply-To: <461A0DDC.5060709@sw.ru>
Pavel Emelianov wrote:
> This causes constructions like
>
> down_write(&mm1->mmap_sem);
> if (down_write_trylock(&mm2->mmap_sem)) {
> ...
> up_write(&mm2->mmap_sem);
> }
> up_write(&mm1->mmap_sem);
>
> generate a lockdep warning about circular locking dependence.
please show me why this is safe, especially if you intermix it with
down_read()'s... like copy_to_user and co may do.
this feels like a very unsafe construct to me...
next prev parent reply other threads:[~2007-04-09 15:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-09 9:56 [PATCH] Lockdep treats down_write_trylock like regular down_write Pavel Emelianov
2007-04-09 15:09 ` Arjan van de Ven [this message]
2007-04-10 7:37 ` Pavel Emelianov
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=461A5733.3080303@linux.intel.com \
--to=arjan@linux.intel.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=xemul@sw.ru \
/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