diff options
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r-- | mm/oom_kill.c | 4 |
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) | |||
653 | 653 | ||
654 | /* oom_mm is bound to the signal struct life time. */ | 654 | /* oom_mm is bound to the signal struct life time. */ |
655 | if (!cmpxchg(&tsk->signal->oom_mm, NULL, mm)) | 655 | if (!cmpxchg(&tsk->signal->oom_mm, NULL, mm)) |
656 | atomic_inc(&tsk->signal->oom_mm->mm_count); | 656 | mmgrab(tsk->signal->oom_mm); |
657 | 657 | ||
658 | /* | 658 | /* |
659 | * Make sure that the task is woken up from uninterruptible sleep | 659 | * 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) | |||
870 | 870 | ||
871 | /* Get a reference to safely compare mm after task_unlock(victim) */ | 871 | /* Get a reference to safely compare mm after task_unlock(victim) */ |
872 | mm = victim->mm; | 872 | mm = victim->mm; |
873 | atomic_inc(&mm->mm_count); | 873 | mmgrab(mm); |
874 | /* | 874 | /* |
875 | * We should send SIGKILL before setting TIF_MEMDIE in order to prevent | 875 | * We should send SIGKILL before setting TIF_MEMDIE in order to prevent |
876 | * the OOM victim from depleting the memory reserves from the user | 876 | * the OOM victim from depleting the memory reserves from the user |