summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/oom_kill.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 2d5135c1b1ba..3a2484884cfd 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -929,7 +929,8 @@ static void __oom_kill_process(struct task_struct *victim, const char *message)
*/
static int oom_kill_memcg_member(struct task_struct *task, void *message)
{
- if (task->signal->oom_score_adj != OOM_SCORE_ADJ_MIN) {
+ if (task->signal->oom_score_adj != OOM_SCORE_ADJ_MIN &&
+ !is_global_init(task)) {
get_task_struct(task);
__oom_kill_process(task, message);
}