]> git.karo-electronics.de Git - karo-tx-linux.git/commit
After selecting a task to kill, the oom killer iterates all processes and
authorDavid Rientjes <rientjes@google.com>
Wed, 24 Aug 2011 23:46:49 +0000 (09:46 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Sep 2011 05:16:09 +0000 (15:16 +1000)
commit81e994b554edb6d9cf0e66aba65343184a3f78ec
tree634958a5153cf053bec0286d15a6a7825649c4cd
parent0c110ea6e6bc030915458e7096476d487eca6422
After selecting a task to kill, the oom killer iterates all processes and
kills all other threads that share the same mm_struct in different thread
groups.  It would not otherwise be helpful to kill a thread if its memory
would not be subsequently freed.

A kernel thread, however, may assume a user thread's mm by using
use_mm().  This is only temporary and should not result in sending a
SIGKILL to that kthread.

This patch ensures that only user threads and not kthreads are sent a
SIGKILL if they share the same mm_struct as the oom killed task.

Signed-off-by: David Rientjes <rientjes@google.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/oom_kill.c