On Wed, Nov 11, 2020 at 10:51:36AM +0800, Fugang Duan wrote: > For below code, there has chance to cause deadlock in SMP system: > Thread 1: > clk_enable_lock(); > pr_info("debug message"); > clk_enable_unlock(); > > Thread 2: > imx_uart_console_write() > clk_enable() > clk_enable_lock(); > > Thread 1: > Acuired clk enable_lock -> printk -> console_trylock_spinning > Thread 2: > console_unlock() -> imx_uart_console_write -> clk_disable -> Acquite clk enable_lock > > So the patch is to keep console port clocks always on like > other console drivers. > > Fixes: 1cf93e0d5488 ("serial: imx: remove the uart_console() check") > Signed-off-by: Fugang Duan <fugang.duan@xxxxxxx> Acked-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> Cc: stable@xxxxxxxxxx Thanks Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
Attachment:
signature.asc
Description: PGP signature