]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm, oom: fix potential killing of thread that is disabled from oom killing
authorDavid Rientjes <rientjes@google.com>
Sat, 21 Jul 2012 00:54:09 +0000 (10:54 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Jul 2012 03:02:29 +0000 (13:02 +1000)
commitf07572d8f19a49da7841a73c3e4071b06a3838e6
tree8f9db8021201ce9cd412257085188e3005dfa498
parentfd8250331dd0a8b285b6b2a6a3f46b77559c5acd
mm, oom: fix potential killing of thread that is disabled from oom killing

/proc/sys/vm/oom_kill_allocating_task will immediately kill current when
the oom killer is called to avoid a potentially expensive tasklist scan
for large systems.

Currently, however, it is not checking current's oom_score_adj value which
may be OOM_SCORE_ADJ_MIN, meaning that it has been disabled from oom
killing.

This patch avoids killing current in such a condition and simply falls
back to the tasklist scan since memory still needs to be freed.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/oom_kill.c