lkml.org 
[lkml]   [2021]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] kernel/hung_task.c: add error info when failed to start khungtaskd
Date
we need add necessary error info when core thread started failed

Signed-off-by: Weitao Hou <houweitao@didiglobal.com>
---
kernel/hung_task.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index 8cc07e7f29aa..8a95997a693e 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -354,6 +354,10 @@ static int __init hung_task_init(void)
pm_notifier(hungtask_pm_notify, 0);

watchdog_task = kthread_run(watchdog, NULL, "khungtaskd");
+ if (IS_ERR(watchdog_task)) {
+ pr_err("Failed to start khungtaskd\n");
+ watchdog_task = NULL;
+ }

return 0;
}
--
2.17.1
\
 
 \ /
  Last update: 2021-10-22 10:56    [W:0.032 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site