diff options
author | Davidlohr Bueso <[email protected]> | 2019-01-03 15:27:12 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-01-04 13:13:46 -0800 |
commit | 21877e1a5b520132f54515f8835c963056418b4c (patch) | |
tree | 0d2134af802d232c928ddb92fa1420316b29fa9c | |
parent | 76699a67f3041ff4c7af6d6ee9be2bfbf1ffb671 (diff) |
fs/epoll: robustify ep->mtx held checks
Insted of just commenting how important it is, lets make it more robust
and add a lockdep_assert_held() call.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Davidlohr Bueso <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Jason Baron <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | fs/eventpoll.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index fb7f05f4099d..68e27d1cb5cd 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1637,6 +1637,8 @@ static __poll_t ep_send_events_proc(struct eventpoll *ep, struct list_head *head * Items cannot vanish during the loop because ep_scan_ready_list() is * holding "mtx" during this call. */ + lockdep_assert_held(&ep->mtx); + list_for_each_entry_safe(epi, tmp, head, rdllink) { if (esed->res >= esed->maxevents) break; |