proc_oom_score: remove tasklist_lock and pid_alive()
authorOleg Nesterov <oleg@redhat.com>
Tue, 2 Aug 2016 21:03:19 +0000 (14:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Aug 2016 21:31:41 +0000 (17:31 -0400)
commitef419398b68925f21fd3d8463c7bf6934d2ec926
tree7e8d69e75acb73da297061a5201e20a0c634f207
parentdb4ad0360c54a4e3bf07de9dfe429259ca8dc223
proc_oom_score: remove tasklist_lock and pid_alive()

This was needed before to ensure that ->signal != 0 and do_each_thread()
is safe, see commit b95c35e76b29b ("oom: fix the unsafe usage of
badness() in proc_oom_score()") for details.

Today tsk->signal can't go away and for_each_thread(tsk) is always safe.

Link: http://lkml.kernel.org/r/20160608211921.GA15508@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/base.c