mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
printk: Don't WARN on kthread_run failure.
Since __kthread_create_on_node() returns -EINTR upon SIGKILL, we should not use WARN_ON() in order to catch kthread_run() failure. Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=1ebbc20f223b99446034 Fixes:5f53ca3ff8("printk: Implement legacy printer kthread for PREEMPT_RT") Fixes:76f258bf3f("printk: nbcon: Introduce printer kthreads") Signed-off-by: Tetsuo Handa <[email protected]> Reviewed-by: John Ogness <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Petr Mladek <[email protected]>
This commit is contained in:
1 parent
77ae27fd98
commit
72dd0ec09e
2 files changed
+2
-2
No files matched your search
@@ -1382,7 +1382,7 @@ bool nbcon_kthread_create(struct console *con)
|
||||
return true;
|
||||
|
||||
kt = kthread_run(nbcon_kthread_func, con, "pr/%s%d", con->name, con->index);
|
||||
if (WARN_ON(IS_ERR(kt))) {
|
||||
if (IS_ERR(kt)) {
|
||||
con_printk(KERN_ERR, con, "failed to start printing thread\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3732,7 +3732,7 @@ static bool legacy_kthread_create(void)
|
||||
lockdep_assert_console_list_lock_held();
|
||||
|
||||
kt = kthread_run(legacy_kthread_func, NULL, "pr/legacy");
|
||||
if (WARN_ON(IS_ERR(kt))) {
|
||||
if (IS_ERR(kt)) {
|
||||
pr_err("failed to start legacy printing thread\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user