aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2017-11-15 20:39:10 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-15 21:21:07 -0500
commitc50842c8e1cddcdb69d3ece4f4df005a0e6c5ceb (patch)
tree3624b44f543ac020d49eb9e1b768049fe3066da8 /mm
parente492080e640c2d1235ddf3441cae634cfffef7e1 (diff)
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: http://lkml.kernel.org/r/1510137800-4602-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/oom_kill.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 26add8a0d1f7..a501a0a1f0f8 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -640,9 +640,6 @@ static int oom_reaper(void *unused)
640 640
641static void wake_oom_reaper(struct task_struct *tsk) 641static void wake_oom_reaper(struct task_struct *tsk)
642{ 642{
643 if (!oom_reaper_th)
644 return;
645
646 /* tsk is already queued? */ 643 /* tsk is already queued? */
647 if (tsk == oom_reaper_list || tsk->oom_reaper_list) 644 if (tsk == oom_reaper_list || tsk->oom_reaper_list)
648 return; 645 return;
@@ -660,11 +657,6 @@ static void wake_oom_reaper(struct task_struct *tsk)
660static int __init oom_init(void) 657static int __init oom_init(void)
661{ 658{
662 oom_reaper_th = kthread_run(oom_reaper, NULL, "oom_reaper"); 659 oom_reaper_th = kthread_run(oom_reaper, NULL, "oom_reaper");
663 if (IS_ERR(oom_reaper_th)) {
664 pr_err("Unable to start OOM reaper %ld. Continuing regardless\n",
665 PTR_ERR(oom_reaper_th));
666 oom_reaper_th = NULL;
667 }
668 return 0; 660 return 0;
669} 661}
670subsys_initcall(oom_init) 662subsys_initcall(oom_init)