]> git.baikalelectronics.ru Git - kernel.git/commit
mm, oom_reaper: do not use siglock in try_oom_reaper()
authorMichal Hocko <mhocko@suse.com>
Fri, 3 Jun 2016 21:55:55 +0000 (14:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Jun 2016 23:02:56 +0000 (16:02 -0700)
commitc02751ac5689a09eb1a1117c5a1537b2a9913fff
tree313e8398a476f95583156893e8459c3f3592201a
parentab178c26769ea116a8e499c3362cf0cc73e662bb
mm, oom_reaper: do not use siglock in try_oom_reaper()

Oleg has noted that siglock usage in try_oom_reaper is both pointless
and dangerous.  signal_group_exit can be checked lockless.  The problem
is that sighand becomes NULL in __exit_signal so we can crash.

Fixes: ce2bd552c729 ("oom, oom_reaper: try to reap tasks which skip regular OOM killer path")
Link: http://lkml.kernel.org/r/1464679423-30218-1-git-send-email-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/oom_kill.c