lkml.org 
[lkml]   [2011]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] epoll: Fix spurious lockdep warnings
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...

Thanks,

-Jason


\
 
 \ /
  Last update: 2011-09-13 22:25    [W:0.062 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site