kernel_optimize_test/include/linux/sched
Matthew Wilcox (Oracle) 3cbe8f9193 include/linux/sched/mm.h: use rcu_dereference in in_vfork()
[ Upstream commit 149fc787353f65b7e72e05e7b75d34863266c3e2 ]

Fix a sparse warning by using rcu_dereference().  Technically this is a
bug and a sufficiently aggressive compiler could reload the `real_parent'
pointer outside the protection of the rcu lock (and access freed memory),
but I think it's pretty unlikely to happen.

Link: https://lkml.kernel.org/r/20210221194207.1351703-1-willy@infradead.org
Fixes: b18dc5f291 ("mm, oom: skip vforked tasks from being selected")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-17 17:06:34 +01:00
..
autogroup.h
clock.h
coredump.h mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary 2020-10-13 18:38:35 -07:00
cpufreq.h
cputime.h
deadline.h
debug.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
hotplug.h
idle.h
init.h
isolation.h
jobctl.h
loadavg.h
mm.h include/linux/sched/mm.h: use rcu_dereference in in_vfork() 2021-03-17 17:06:34 +01:00
nohz.h
numa_balancing.h
prio.h
rt.h
sd_flags.h sched/topology: Mark SD_NUMA as SDF_NEEDS_GROUPS 2020-08-19 10:49:50 +02:00
signal.h exec: Transform exec_update_mutex into a rw_semaphore 2021-01-09 13:46:24 +01:00
smt.h
stat.h
sysctl.h
task_stack.h
task.h sched: remove _do_fork() 2020-08-20 13:12:59 +02:00
topology.h sched/topology: Move SD_DEGENERATE_GROUPS_MASK out of linux/sched/topology.h 2020-08-26 12:41:59 +02:00
types.h
user.h watch_queue: Limit the number of watches a user can hold 2020-08-17 09:39:18 -07:00
wake_q.h
xacct.h