OpenCloudOS-Kernel/include/linux/sched
Peter Zijlstra b1e8206582 sched: Fix yet more sched_fork() races
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
2022-02-19 11:11:05 +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 sched/cputime: Fix getrusage(RUSAGE_THREAD) with nohz_full 2021-12-02 15:08:22 +01:00
deadline.h
debug.h sched: Change task_struct::state 2021-06-18 11:43:09 +02:00
hotplug.h
idle.h sched,livepatch: Use wake_up_if_idle() 2021-10-14 13:09:25 +02:00
init.h
isolation.h
jobctl.h
loadavg.h
mm.h mm: introduce memalloc_retry_wait() 2022-01-15 16:30:29 +02: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: Remove the helper signal_group_exit 2022-01-08 12:43:57 -06:00
smt.h
stat.h sched: Make nr_iowait_cpu() return 32-bit value 2021-05-12 21:34:16 +02:00
sysctl.h hung_task: move hung_task sysctl interface to hung_task.c 2022-01-22 08:33:34 +02:00
task.h sched: Fix yet more sched_fork() races 2022-02-19 11:11:05 +01:00
task_stack.h task_stack: Fix end_of_stack() for architectures with upwards-growing stack 2021-10-30 23:11:01 +02:00
topology.h arch_topology: Remove unused topology_set_thermal_pressure() and related 2021-11-23 15:10:26 +05:30
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