mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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]>
This commit is contained in:
1 parent
76699a67f3
commit
21877e1a5b
1 file changed
+2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user