Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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/20181108051006.18751-5-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jason Baron <jbaron@akamai.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Davidlohr Bueso and committed by
Linus Torvalds
21877e1a 76699a67

+2
+2
fs/eventpoll.c
··· 1637 1637 * Items cannot vanish during the loop because ep_scan_ready_list() is 1638 1638 * holding "mtx" during this call. 1639 1639 */ 1640 + lockdep_assert_held(&ep->mtx); 1641 + 1640 1642 list_for_each_entry_safe(epi, tmp, head, rdllink) { 1641 1643 if (esed->res >= esed->maxevents) 1642 1644 break;