From 3735237f4178ce99068cc8dae0a14dd25b5b369e Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Mon, 20 Nov 2017 16:16:16 +0800 Subject: [PATCH] rk_serial: use kthread_run Use kthread_run instead of kthread_create when create kconsole thread. We should call wake_up_process after kthread_create, otherwise kconsole will keep in TASK_UNINTERRUPTIBLE state when loglevel=0. Then kconsole will become hung task, and will trigger hung task timeout. Change-Id: I6b9edfc60a96202b356d0fe519073ea4665ae32a Signed-off-by: Tao Huang --- drivers/tty/serial/rk_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/rk_serial.c b/drivers/tty/serial/rk_serial.c index 2f9d8de00ac2..8dc67b62ad91 100644 --- a/drivers/tty/serial/rk_serial.c +++ b/drivers/tty/serial/rk_serial.c @@ -1852,7 +1852,7 @@ static int __init serial_rk_console_setup(struct console *co, char *options) #ifdef CONFIG_RK_CONSOLE_THREAD if (!console_task) { - console_task = kthread_create(console_thread, up, "kconsole"); + console_task = kthread_run(console_thread, up, "kconsole"); if (!IS_ERR(console_task)) co->write = console_write; }