aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/oom_kill.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 80b34e285f96..3cbd76b8c13b 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -266,8 +266,6 @@ enum oom_scan_t oom_scan_process_thread(struct task_struct *task,
266 * Don't allow any other task to have access to the reserves. 266 * Don't allow any other task to have access to the reserves.
267 */ 267 */
268 if (test_tsk_thread_flag(task, TIF_MEMDIE)) { 268 if (test_tsk_thread_flag(task, TIF_MEMDIE)) {
269 if (unlikely(frozen(task)))
270 __thaw_task(task);
271 if (!force_kill) 269 if (!force_kill)
272 return OOM_SCAN_ABORT; 270 return OOM_SCAN_ABORT;
273 } 271 }
@@ -423,6 +421,14 @@ void note_oom_kill(void)
423void mark_tsk_oom_victim(struct task_struct *tsk) 421void mark_tsk_oom_victim(struct task_struct *tsk)
424{ 422{
425 set_tsk_thread_flag(tsk, TIF_MEMDIE); 423 set_tsk_thread_flag(tsk, TIF_MEMDIE);
424
425 /*
426 * Make sure that the task is woken up from uninterruptible sleep
427 * if it is frozen because OOM killer wouldn't be able to free
428 * any memory and livelock. freezing_slow_path will tell the freezer
429 * that TIF_MEMDIE tasks should be ignored.
430 */
431 __thaw_task(tsk);
426} 432}
427 433
428/** 434/**