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>2016-03-11 15:56:34 +0100
commitc53fc67de39e70735188ec382d3ecebac5b9cdf3 (patch)
tree86f3b19a2b0596e3cda5188eebb42a660ff83826 /kernel
parenta48d2f28a3edb19c6c2138575f0accdf6034e226 (diff)
downloadkernel_samsung_espresso10-c53fc67de39e70735188ec382d3ecebac5b9cdf3.tar.gz
kernel_samsung_espresso10-c53fc67de39e70735188ec382d3ecebac5b9cdf3.tar.bz2
kernel_samsung_espresso10-c53fc67de39e70735188ec382d3ecebac5b9cdf3.zip
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