linux-samsung-r9q2/include/linux/sched
Oleg Nesterov 5ffd2c37cb kill do_each_thread()
Eric has pointed out that we still have 3 users of do_each_thread().
Change them to use for_each_process_thread() and kill this helper.

There is a subtle change, after do_each_thread/while_each_thread g == t ==
&init_task, while after for_each_process_thread() they both point to
nowhere, but this doesn't matter.

> Why is for_each_process_thread() better than do_each_thread()?

Say, for_each_process_thread() is rcu safe, do_each_thread() is not.

And certainly

	for_each_process_thread(p, t) {
		do_something(p, t);
	}

looks better than

	do_each_thread(p, t) {
		do_something(p, t);
	} while_each_thread(p, t);

And again, there are only 3 users of this awkward helper left.  It should
have been killed years ago and in fact I thought it had already been
killed.  It uses while_each_thread() which needs some changes.

Link: https://lkml.kernel.org/r/20230817163708.GA8248@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: "Christian Brauner (Microsoft)" <brauner@kernel.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jiri Slaby <jirislaby@kernel.org> # tty/serial
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-08-21 13:46:25 -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 cputime: remove cputime_to_nsecs fallback 2022-12-27 12:52:17 +01:00
deadline.h
debug.h
hotplug.h
idle.h cpuidle, sched: Remove instrumentation from TIF_{POLLING_NRFLAG,NEED_RESCHED} 2023-01-13 11:48:16 +01:00
init.h
isolation.h sched/isolation: add cpu_is_isolated() API 2023-04-18 16:29:43 -07:00
jobctl.h sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state 2022-05-11 14:37:06 -05:00
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 sched/core: Always flush pending blk_plug 2022-07-13 11:29:17 +02:00
sd_flags.h sched/topology: Remove SHARED_CHILD from ASYM_PACKING 2023-05-08 10:58:37 +02:00
signal.h kill do_each_thread() 2023-08-21 13:46:25 -07:00
smt.h
stat.h
sysctl.h sched: Move numa_balancing sysctls to its own file 2022-11-20 20:55:26 -08:00
task.h locking: Introduce __cleanup() based infrastructure 2023-06-26 11:14:18 +02:00
task_flags.h
task_stack.h sched: Fix KCSAN noinstr violation 2023-04-14 16:08:26 +02:00
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 kernel/user: Allow user_struct::locked_vm to be usable for iommufd 2022-11-30 20:16:49 -04:00
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