WSL2-Linux-Kernel/include/linux/sched
Peter Zijlstra 3411613611 sched: Fix yet more sched_fork() races
commit b1e8206582 upstream.

Where commit 4ef0c5c6b5 ("kernel/sched: Fix sched_fork() access an
invalid sched_task_group") fixed a fork race vs cgroup, it opened up a
race vs syscalls by not placing the task on the runqueue before it
gets exposed through the pidhash.

Commit 13765de814 ("sched/fair: Fix fault in reweight_entity") is
trying to fix a single instance of this, instead fix the whole class
of issues, effectively reverting this commit.

Fixes: 4ef0c5c6b5 ("kernel/sched: Fix sched_fork() access an invalid sched_task_group")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Tadeusz Struk <tadeusz.struk@linaro.org>
Tested-by: Zhang Qiao <zhangqiao22@huawei.com>
Tested-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://lkml.kernel.org/r/YgoeCbwj5mbCR0qA@hirez.programming.kicks-ass.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-08 19:12:49 +01:00
..
autogroup.h
clock.h
coredump.h mm: gup: pack has_pinned in MMF_HAS_PINNED 2021-06-29 10:53:48 -07:00
cpufreq.h sched/cpufreq: Consider reduced CPU capacity in energy calculation 2021-06-17 14:11:43 +02:00
cputime.h
deadline.h
debug.h sched: Change task_struct::state 2021-06-18 11:43:09 +02:00
hotplug.h
idle.h
init.h
isolation.h
jobctl.h
loadavg.h
mm.h memcg: replace in_interrupt() by !in_task() in active_memcg() 2021-09-03 09:58:13 -07:00
nohz.h
numa_balancing.h
prio.h
rt.h
sd_flags.h sched/core: Introduce SD_ASYM_CPUCAPACITY_FULL sched_domain flag 2021-06-24 09:07:50 +02:00
signal.h signal: Replace force_fatal_sig with force_exit_sig when in doubt 2021-11-25 09:49:07 +01:00
smt.h
stat.h sched: Make nr_iowait_cpu() return 32-bit value 2021-05-12 21:34:16 +02:00
sysctl.h sched/sysctl: Move extern sysctl declarations to sched.h 2021-06-28 15:42:25 +02:00
task.h sched: Fix yet more sched_fork() races 2022-03-08 19:12:49 +01:00
task_stack.h task_stack: Fix end_of_stack() for architectures with upwards-growing stack 2021-11-18 19:16:21 +01:00
topology.h
types.h
user.h fs/epoll: use a per-cpu counter for user's watches count 2021-09-08 11:50:27 -07:00
wake_q.h sched/wake_q: Provide WAKE_Q_HEAD_INITIALIZER() 2021-08-17 16:57:55 +02:00
xacct.h