diff options
Diffstat (limited to 'include/linux/sched/signal.h')
-rw-r--r-- | include/linux/sched/signal.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index 669e8cff40c7..0014d3adaf84 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h @@ -649,12 +649,9 @@ extern void flush_itimer_signals(void); extern bool current_is_single_threaded(void); /* - * Careful: do_each_thread/while_each_thread is a double loop so - * 'break' will not work as expected - use goto instead. + * Without tasklist/siglock it is only rcu-safe if g can't exit/exec, + * otherwise next_thread(t) will never reach g after list_del_rcu(g). */ -#define do_each_thread(g, t) \ - for (g = t = &init_task ; (g = t = next_task(g)) != &init_task ; ) do - #define while_each_thread(g, t) \ while ((t = next_thread(t)) != g) |