aboutsummaryrefslogtreecommitdiff
path: root/include/linux/cpuidle.h
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2015-02-11 15:24:54 -0800
committerMoyster <oysterized@gmail.com>2019-05-02 19:03:20 +0200
commitbf605664dc5eea13397fd4788bef9d45dbdfe170 (patch)
tree6f99aae4bbbc65592e3a24142a7fb72adb214dae /include/linux/cpuidle.h
parentada17f09388848b447d48519b4eab6914152f1b5 (diff)
oom: don't count on mm-less current process
out_of_memory() doesn't trigger the OOM killer if the current task is already exiting or it has fatal signals pending, and gives the task access to memory reserves instead. However, doing so is wrong if out_of_memory() is called by an allocation (e.g. from exit_task_work()) after the current task has already released its memory and cleared TIF_MEMDIE at exit_mm(). If we again set TIF_MEMDIE to post-exit_mm() current task, the OOM killer will be blocked by the task sitting in the final schedule() waiting for its parent to reap it. It will trigger an OOM livelock if its parent is unable to reap it due to doing an allocation and waiting for the OOM killer to kill it. Change-Id: I8d23a0e41df8380ee55c368121ba3fec2b62fced Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Michal Hocko <mhocko@suse.cz> Cc: David Rientjes <rientjes@google.com> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/cpuidle.h')
0 files changed, 0 insertions, 0 deletions