]> Git Repo - linux.git/commit - mm/oom_kill.c
oom_kill: add rcu_read_lock() into find_lock_task_mm()
authorOleg Nesterov <[email protected]>
Tue, 21 Jan 2014 23:50:01 +0000 (15:50 -0800)
committerLinus Torvalds <[email protected]>
Wed, 22 Jan 2014 00:19:46 +0000 (16:19 -0800)
commit4d4048be8a93769350efa31d2482a038b7de73d0
tree9ee0a9d1e392117d1285641d82c1d537e0d13ec8
parentad96244179fbd55b40c00f10f399bc04739b8e1f
oom_kill: add rcu_read_lock() into find_lock_task_mm()

find_lock_task_mm() expects it is called under rcu or tasklist lock, but
it seems that at least oom_unkillable_task()->task_in_mem_cgroup() and
mem_cgroup_out_of_memory()->oom_badness() can call it lockless.

Perhaps we could fix the callers, but this patch simply adds rcu lock
into find_lock_task_mm().  This also allows to simplify a bit one of its
callers, oom_kill_process().

Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Sergey Dyasly <[email protected]>
Cc: Sameer Nanda <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mandeep Singh Baines <[email protected]>
Cc: "Ma, Xindong" <[email protected]>
Reviewed-by: Michal Hocko <[email protected]>
Cc: "Tu, Xiaobing" <[email protected]>
Acked-by: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/oom_kill.c
This page took 0.046489 seconds and 4 git commands to generate.