From: Linus Torvalds Date: Sun, 20 Feb 2022 20:40:20 +0000 (-0800) Subject: Merge tag 'sched_urgent_for_v5.17_rc5' of git://git.kernel.org/pub/scm/linux/kernel... X-Git-Tag: baikal/aarch64/sdk6.1~4624 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=8a871e6dde8551910a94e9b62945425b5b58dd8f;p=kernel.git Merge tag 'sched_urgent_for_v5.17_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Borislav Petkov: "Fix task exposure order when forking tasks" * tag 'sched_urgent_for_v5.17_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched: Fix yet more sched_fork() races --- 8a871e6dde8551910a94e9b62945425b5b58dd8f diff --cc kernel/fork.c index bfa933473ff3f,c607d238fc23b..a024bf6254df8 --- a/kernel/fork.c +++ b/kernel/fork.c @@@ -2371,11 -2386,8 +2382,11 @@@ static __latent_entropy struct task_str syscall_tracepoint_update(p); write_unlock_irq(&tasklist_lock); + if (pidfile) + fd_install(pidfd, pidfile); + proc_fork_connector(p); - sched_post_fork(p, args); + sched_post_fork(p); cgroup_post_fork(p, args); perf_event_fork(p);