From: David Rientjes Date: Wed, 6 May 2009 23:02:55 +0000 (-0700) Subject: oom: prevent livelock when oom_kill_allocating_task is set X-Git-Tag: v2.6.30-rc5~21 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=184101bf143ac96d62b3dcc17e7b3550f98d3350;p=pandora-kernel.git oom: prevent livelock when oom_kill_allocating_task is set When /proc/sys/vm/oom_kill_allocating_task is set for large systems that want to avoid the lengthy tasklist scan, it's possible to livelock if current is ineligible for oom kill. This normally happens when it is set to OOM_DISABLE, but is also possible if any threads are sharing the same ->mm with a different tgid. So change __out_of_memory() to fall back to the full task-list scan if it was unable to kill `current'. Cc: Nick Piggin Signed-off-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed