diff options
author | Nelson Elhage <[email protected]> | 2011-10-31 17:13:14 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2011-10-31 17:30:57 -0700 |
commit | d8805e633e054c816c47cb6e727c81f156d9253d (patch) | |
tree | 8f7151e635a38593d68eae40586449627d835965 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf | |
parent | 15662b3e8644905032c2e26808401a487d4e90c1 (diff) |
epoll: fix spurious lockdep warnings
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<--------------------
Reported-by: Paul Bolle <[email protected]>
Tested-by: Paul Bolle <[email protected]>
Signed-off-by: Nelson Elhage <[email protected]>
Acked-by: Jason Baron <[email protected]>
Cc: Dave Jones <[email protected]>
Cc: Davide Libenzi <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf')
0 files changed, 0 insertions, 0 deletions