]> git.baikalelectronics.ru Git - kernel.git/commit
oom: avoid sending exiting tasks a SIGKILL
authorDavid Rientjes <rientjes@google.com>
Tue, 10 Aug 2010 00:18:49 +0000 (17:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Aug 2010 03:44:56 +0000 (20:44 -0700)
commitc821d35eda0739c489e0f64de7a5bbae43a3ab44
tree0c5a47808790e80a754b44aebe82c5c683811788
parentafebffb69e23b58fce59942be112054002a5bb0f
oom: avoid sending exiting tasks a SIGKILL

It's unnecessary to SIGKILL a task that is already PF_EXITING and can
actually cause a NULL pointer dereference of the sighand if it has already
been detached.  Instead, simply set TIF_MEMDIE so it has access to memory
reserves and can quickly exit as the comment implies.

Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
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>
mm/oom_kill.c