aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2011-10-31 17:07:11 -0700
committerZiyan <jaraidaniel@gmail.com>2015-01-15 20:49:07 +0100
commitc4d0e26eb007a404e3f0a02718b07b046634bc16 (patch)
tree6db5895b53592a836f581040f3ac42e291304488 /kernel
parent7f63f0a4cea2b18f46d42a47699d97a65cacb28e (diff)
downloadkernel_samsung_tuna-c4d0e26eb007a404e3f0a02718b07b046634bc16.zip
kernel_samsung_tuna-c4d0e26eb007a404e3f0a02718b07b046634bc16.tar.gz
kernel_samsung_tuna-c4d0e26eb007a404e3f0a02718b07b046634bc16.tar.bz2
oom: avoid killing kthreads if they assume the oom killed thread's mm
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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions