Commit c50842c8 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Linus Torvalds

mm,oom_reaper: remove pointless kthread_run() error check

Since oom_init() is called before userspace processes start, memory
allocation failure for creating the OOM reaper kernel thread will let
the OOM killer call panic() rather than wake up the OOM reaper.

Link: default avatarTetsuo Handa <>
Acked-by: default avatarMichal Hocko <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent e492080e
......@@ -640,9 +640,6 @@ static int oom_reaper(void *unused)
static void wake_oom_reaper(struct task_struct *tsk)
if (!oom_reaper_th)
/* tsk is already queued? */
if (tsk == oom_reaper_list || tsk->oom_reaper_list)
......@@ -660,11 +657,6 @@ static void wake_oom_reaper(struct task_struct *tsk)
static int __init oom_init(void)
oom_reaper_th = kthread_run(oom_reaper, NULL, "oom_reaper");
if (IS_ERR(oom_reaper_th)) {
pr_err("Unable to start OOM reaper %ld. Continuing regardless\n",
oom_reaper_th = NULL;
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment