diff options
author | Fugang Duan <[email protected]> | 2020-11-11 10:51:36 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2020-11-12 09:39:53 +0100 |
commit | e67c139c488e84e7eae6c333231e791f0e89b3fb (patch) | |
tree | fbaf0eef288eefcc641d39c8416aabb730673026 /lib/test_fortify | |
parent | d4122754442799187d5d537a9c039a49a67e57f1 (diff) |
tty: serial: imx: keep console clocks always on
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")
Acked-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Fugang Duan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: stable <[email protected]>
[fix up build warning - gregkh]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/test_fortify')
0 files changed, 0 insertions, 0 deletions