sched: Assert for_each_thread() is properly locked
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 21 Aug 2023 13:44:28 +0000 (14:44 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 15 Sep 2023 08:33:29 +0000 (10:33 +0200)
commit4de7b17fd05d03fa919e8c47fc66122bd24d7b6c
treebc97f8b4e62134399d59729f17517b6dded55422
parent0e34600ac9317dbe5f0a7bfaa3d7187d757572ed
sched: Assert for_each_thread() is properly locked

list_for_each_entry_rcu() takes an optional fourth argument which
allows RCU to assert that the correct lock is held.  Several callers
of for_each_thread() rely on their caller to be holding the appropriate
lock, so this is a useful assertion to include.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Link: https://lore.kernel.org/r/20230821134428.2504912-1-willy@infradead.org
include/linux/sched/signal.h