projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63c04ee
)
mm,oom_reaper: don't call mmput_async() without atomic_inc_not_zero()
author
Tetsuo Handa
<
[email protected]
>
Fri, 24 Jun 2016 21:48:35 +0000
(14:48 -0700)
committer
Linus Torvalds
<
[email protected]
>
Sat, 25 Jun 2016 00:23:52 +0000
(17:23 -0700)
Commit
e2fe14564d33
("oom_reaper: close race with exiting task") reduced
frequency of needlessly selecting next OOM victim, but was calling
mmput_async() when atomic_inc_not_zero() failed.
Link:
http://lkml.kernel.org/r/1464423365-5555-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp
Signed-off-by: Tetsuo Handa <
[email protected]
>
Acked-by: Michal Hocko <
[email protected]
>
Cc: Arnd Bergmann <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/oom_kill.c
patch
|
blob
|
history
diff --git
a/mm/oom_kill.c
b/mm/oom_kill.c
index acbc432d1a52778d746879d652fd4c2001075868..be67df3b6569f019732cd54adab7918f987edc9d 100644
(file)
--- a/
mm/oom_kill.c
+++ b/
mm/oom_kill.c
@@
-478,6
+478,7
@@
static bool __oom_reap_task(struct task_struct *tsk)
mm = p->mm;
if (!atomic_inc_not_zero(&mm->mm_users)) {
task_unlock(p);
+ mm = NULL;
goto unlock_oom;
}