summaryrefslogtreecommitdiffstats
path: root/fs/select.c
diff options
context:
space:
mode:
authorOleg Nesterov2014-01-22 00:50:01 +0100
committerLinus Torvalds2014-01-22 01:19:46 +0100
commit4d4048be8a93769350efa31d2482a038b7de73d0 (patch)
tree9ee0a9d1e392117d1285641d82c1d537e0d13ec8 /fs/select.c
parentoom_kill: has_intersects_mems_allowed() needs rcu_read_lock() (diff)
downloadkernel-qcow2-linux-4d4048be8a93769350efa31d2482a038b7de73d0.tar.gz
kernel-qcow2-linux-4d4048be8a93769350efa31d2482a038b7de73d0.tar.xz
kernel-qcow2-linux-4d4048be8a93769350efa31d2482a038b7de73d0.zip
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 <oleg@redhat.com> Cc: Sergey Dyasly <dserrg@gmail.com> Cc: Sameer Nanda <snanda@chromium.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mandeep Singh Baines <msb@chromium.org> Cc: "Ma, Xindong" <xindong.ma@intel.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Cc: "Tu, Xiaobing" <xiaobing.tu@intel.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/select.c')
0 files changed, 0 insertions, 0 deletions