summaryrefslogtreecommitdiff
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2017-02-17 16:15:57 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2017-02-17 16:15:57 +1100
commitde8fdfbee55bdebd048ec45854c9c0fc30240c7f (patch)
tree3c193ea8ced47b9018eb3bd1a73956d2b9d564fd /mm/oom_kill.c
parent6641ce8e95e9cb5c678cf882f9eb7c7632fa1a2c (diff)
parent171cef6d6ec6c1b4e95f2053545b2dd91931518b (diff)
Merge branch 'akpm/master'
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r--mm/oom_kill.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 578321f1c070..51c091849dcb 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -653,7 +653,7 @@ static void mark_oom_victim(struct task_struct *tsk)
/* oom_mm is bound to the signal struct life time. */
if (!cmpxchg(&tsk->signal->oom_mm, NULL, mm))
- atomic_inc(&tsk->signal->oom_mm->mm_count);
+ mmgrab(tsk->signal->oom_mm);
/*
* Make sure that the task is woken up from uninterruptible sleep
@@ -870,7 +870,7 @@ static void oom_kill_process(struct oom_control *oc, const char *message)
/* Get a reference to safely compare mm after task_unlock(victim) */
mm = victim->mm;
- atomic_inc(&mm->mm_count);
+ mmgrab(mm);
/*
* We should send SIGKILL before setting TIF_MEMDIE in order to prevent
* the OOM victim from depleting the memory reserves from the user