From: Jason Baron <jbaron@redhat.com>
To: Andrew Morton <akpm@google.com>
Cc: Josh Boyer <jwboyer@redhat.com>,
Nelson Elhage <nelhage@nelhage.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Davide Libenzi <davidel@xmailserver.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Paul Bolle <pebolle@tiscali.nl>,
stable@kernel.org
Subject: Re: [PATCH] epoll: Fix spurious lockdep warnings
Date: Thu, 15 Sep 2011 11:15:56 -0400 [thread overview]
Message-ID: <20110915151555.GB3085@redhat.com> (raw)
In-Reply-To: <20110913141603.25614d00.akpm@google.com>
On Tue, Sep 13, 2011 at 02:16:03PM -0700, Andrew Morton wrote:
> On Tue, 13 Sep 2011 16:22:48 -0400
> Jason Baron <jbaron@redhat.com> wrote:
>
> > On Wed, Sep 07, 2011 at 08:04:29PM -0400, Josh Boyer wrote:
> > > On Tue, Aug 09, 2011 at 02:11:55PM -0400, Nelson Elhage wrote:
> > > > epoll can acquire recursively acquire ep->mtx on multiple "struct
> > > > eventpoll"s at once in the case where one epoll fd is monitoring
> > > > another epoll fd. This is perfectly OK, since we're careful about the
> > > > lock ordering, but it causes spurious lockdep warnings. Annotate the
> > > > recursion using mutex_lock_nested, and add a comment explaining the
> > > > nesting rules for good measure.
> > > >
> > > > Recent versions of systemd are triggering this, and it can also be
> > > > demonstrated with the following trivial test program:
> > > >
> > > > --------------------8<--------------------
> > > >
> > > > int main(void) {
> > > > int e1, e2;
> > > > struct epoll_event evt = {
> > > > .events = EPOLLIN
> > > > };
> > > >
> > > > e1 = epoll_create1(0);
> > > > e2 = epoll_create1(0);
> > > > epoll_ctl(e1, EPOLL_CTL_ADD, e2, &evt);
> > > > return 0;
> > > > }
> > > > --------------------8<--------------------
> > > >
> > > > Cc: stable@kernel.org
> > > > Reported-by: Paul Bolle <pebolle@tiscali.nl>
> > > > Tested-by: Paul Bolle <pebolle@tiscali.nl>
> > > > Signed-off-by: Nelson Elhage <nelhage@nelhage.com>
> > >
> > > Any progress on this heading upstream?
> > >
> >
> > Patch looks good to me, feel free to add:
> >
> > Acked-by: Jason Baron <jbaron@redhat.com>
> >
> > However, I am going to have to re-base the epoll path I recently posted:
> > https://lkml.org/lkml/2011/9/2/295, if this goes in first. Perhaps,
> > Andrew (added to the 'cc), can help us sort out the ordering...
>
> I have already fixed up epoll-limit-paths.patch. You're planning on
> sending a new version of that patch. Please do base that on
> epoll-fix-spurious-lockdep-warnings.patch.
Ok, where can I get at these patches? With:
http://userweb.kernel.org/~akpm/mmotm/, still down.
Thanks,
-Jason
next prev parent reply other threads:[~2011-09-15 15:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-09 18:11 [PATCH] epoll: Fix spurious lockdep warnings Nelson Elhage
2011-09-08 0:04 ` Josh Boyer
2011-09-13 20:22 ` Jason Baron
2011-09-13 21:16 ` Andrew Morton
2011-09-15 15:15 ` Jason Baron [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-07-30 21:25 recursive locking: epoll Nelson Elhage
2011-07-30 22:30 ` [PATCH] epoll: Fix spurious lockdep warnings Nelson Elhage
2011-07-31 15:06 ` Paul Bolle
2011-07-31 15:16 ` Nelson Elhage
2011-07-31 21:39 ` Paul Bolle
2011-07-31 21:36 ` Paul Bolle
2011-07-31 21:48 ` Paul Bolle
2011-08-09 15:11 ` Josh Boyer
2011-08-09 17:36 ` Nelson Elhage
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=20110915151555.GB3085@redhat.com \
--to=jbaron@redhat.com \
--cc=akpm@google.com \
--cc=davidel@xmailserver.org \
--cc=jwboyer@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nelhage@nelhage.com \
--cc=pebolle@tiscali.nl \
--cc=stable@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).