OOM: dont kill kernel threads

file:7c72487ca459495026387de3c0c0c0302a44dec7 -> file:7cff979b78f8fcfb24b0ae5ff37aadde64b31076
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -721,9 +721,10 @@ void out_of_memory(struct zonelist *zone
check_panic_on_oom(constraint, gfp_mask, order, mpol_mask);
read_lock(&tasklist_lock);
- if (sysctl_oom_kill_allocating_task &&
+ if (sysctl_oom_kill_allocating_task && current->mm &&
!oom_unkillable_task(current, NULL, nodemask) &&
- current->mm && !atomic_read(&current->mm->oom_disable_count)) {
+ current->signal->oom_score_adj != OOM_SCORE_ADJ_MIN &&
+ !atomic_read(&current->mm->oom_disable_count)) {
/*
* oom_kill_process() needs tasklist_lock held. If it returns
* non-zero, current could not be killed so we must fallback to