diff options
Diffstat (limited to 'mm')
| -rw-r--r-- | mm/oom_kill.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 6c19a8307..ad8afb380 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -278,8 +278,6 @@ enum oom_scan_t oom_scan_process_thread(struct task_struct *task, * someone new to kill. */ if (test_tsk_thread_flag(task, TIF_MEMDIE)) { - if (unlikely(frozen(task))) - __thaw_task(task); if (!force_kill) { if (time_after(jiffies, last_victim + msecs_to_jiffies(100))) { @@ -440,6 +438,14 @@ void note_oom_kill(void) void mark_tsk_oom_victim(struct task_struct *tsk) { set_tsk_thread_flag(tsk, TIF_MEMDIE); + + /* + * Make sure that the task is woken up from uninterruptible sleep + * if it is frozen because OOM killer wouldn't be able to free + * any memory and livelock. freezing_slow_path will tell the freezer + * that TIF_MEMDIE tasks should be ignored. + */ + __thaw_task(tsk); } /** |
