From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Christoph Hellwig <hch@infradead.org>,
Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
William Irwin <wli@holomorphy.com>,
Ingo Molnar <mingo@redhat.com>,
Tyler Hicks <tyhicks@canonical.com>
Subject: Re: hugetlb locking bug.
Date: Wed, 14 Dec 2011 06:59:13 -0500 [thread overview]
Message-ID: <1323863956.1954.50.camel@falcor> (raw)
In-Reply-To: <BANLkTinSytqYA6ozOQEQ16VkRU4gFYpqvg@mail.gmail.com>
On Fri, 2011-04-15 at 14:27 -0700, Linus Torvalds wrote:
> On Fri, Apr 15, 2011 at 2:19 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > (Warning: whitespace damage and TOTALLY UNTESTED)
>
> Gaah. That won't work. Or rather, it probably may work, but while
> working it will spam the logs with that
>
> WARN_ON(!(inode->i_state & I_NEW));
>
> thing from unlock_new_inode.
>
> So the sane thing to do would be apparently one of
>
> (a) ignore the whole thing, and just accept the false lockdep warning.
>
> which I'd be willing to do, but it might be hiding some real
> ones, so we probably shouldn't.
>
> (b) just remove that WARN_ON(), and use the one-liner I suggested
>
> (c) extract the "set directory i_mutex key" logic into a new helper
> function for the case of filesystems like hugetlbfs that don't want to
> use unlock_new_inode() for one reason or another.
>
> Personally, I don't have any really strong preferences and would
> probably just go for (b) to keep the patch small and simple. Anybody?
>
> Linus
Since this discussion, commit "e096d0c lockdep: Add helper function for
dir vs file i_mutex annotation" defined a helper function
lockdep_annotate_inode_mutex_key(), but only hugetlbfs calls it. There
are plenty of other places where new_inode() is called without
unlock_new_inode() (eg. proc, devpts, debugfs, ramfs, ...). Is this
omission intentional or should they be annotated?
An incomplete patch was posted
http://marc.info/?l=linux-fsdevel&m=132369346810326&w=2
(Tyler Hicks' "vfs: Correctly set the dir i_mutex lockdep class" patch
http://marc.info/?l=linux-fsdevel&m=132370587315054&w=2 should be
prereq'ed.)
thanks,
Mimi
next prev parent reply other threads:[~2011-12-14 12:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-15 20:16 hugetlb locking bug Dave Jones
2011-04-15 20:49 ` Linus Torvalds
2011-04-15 20:57 ` Christoph Hellwig
2011-04-15 21:09 ` Peter Zijlstra
2011-04-15 21:13 ` Christoph Hellwig
2011-04-15 21:23 ` Peter Zijlstra
2011-04-15 21:19 ` Linus Torvalds
2011-04-15 21:26 ` Christoph Hellwig
2011-04-15 21:27 ` Linus Torvalds
2011-12-14 11:59 ` Mimi Zohar [this message]
2011-04-15 21:07 ` Peter Zijlstra
-- strict thread matches above, loose matches on Subject: below --
2011-08-22 15:34 Josh Boyer
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=1323863956.1954.50.camel@falcor \
--to=zohar@linux.vnet.ibm.com \
--cc=davej@redhat.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=tyhicks@canonical.com \
--cc=wli@holomorphy.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