oom: skip zombies when iterating tasklist
authorAndrey Vagin <avagin@openvz.org>
Tue, 22 Mar 2011 23:30:11 +0000 (16:30 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 27 Mar 2011 18:35:47 +0000 (11:35 -0700)
commitd00451caef12248e498ba15cc9ba04192a66f3e3
tree5e9cfbe38bd33d2d6b6141544f5dc62a5e9fff5e
parent1163d4ca61ff2544f66b2663c6050f5f00c01fc1
oom: skip zombies when iterating tasklist

commit 30e2b41f20b6238f51e7cffb879c7a0f0073f5fe upstream.

We shouldn't defer oom killing if a thread has already detached its ->mm
and still has TIF_MEMDIE set.  Memory needs to be freed, so find kill
other threads that pin the same ->mm or find another task to kill.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/oom_kill.c