linux-stable/include/linux/sched
Oleg Nesterov dce8f8ed1d document while_each_thread(), change first_tid() to use for_each_thread()
Add the comment to explain that while_each_thread(g,t) is not rcu-safe
unless g is stable (e.g.  current).  Even if g is a group leader and thus
can't exit before t, t or another sub-thread can exec and remove g from
the thread_group list.

The only lockless user of while_each_thread() is first_tid() and it is
fine in that it can't loop forever, yet for_each_thread() looks better and
I am going to change while_each_thread/next_thread.

Link: https://lkml.kernel.org/r/20230823170806.GA11724@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-08-24 16:25:15 -07:00
..
affinity.h
autogroup.h
clock.h sched/clock: Provide local_clock_noinstr() 2023-06-05 21:11:09 +02:00
cond_resched.h
coredump.h mm: add new api to enable ksm per process 2023-04-21 14:52:03 -07:00
cpufreq.h
cputime.h
deadline.h
debug.h
hotplug.h
idle.h
init.h
isolation.h
jobctl.h
loadavg.h
mm.h IOMMU Updates for Linux 6.4 2023-04-30 13:00:38 -07:00
nohz.h
numa_balancing.h
posix-timers.h
prio.h
rseq_api.h
rt.h
sd_flags.h sched/topology: Remove SHARED_CHILD from ASYM_PACKING 2023-05-08 10:58:37 +02:00
signal.h document while_each_thread(), change first_tid() to use for_each_thread() 2023-08-24 16:25:15 -07:00
smt.h
stat.h
sysctl.h
task.h locking: Introduce __cleanup() based infrastructure 2023-06-26 11:14:18 +02:00
task_flags.h
task_stack.h
thread_info_api.h
topology.h sched/topology: Mark set_sched_topology() __init 2023-06-16 17:08:01 +02:00
types.h
user.h
vhost_task.h fork, vhost: Use CLONE_THREAD to fix freezer/ps regression 2023-06-01 17:15:33 -04:00
wake_q.h
xacct.h