linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] sleep in atomic in 8250 runtime PM code path
@ 2018-09-29  5:20 Jisheng Zhang
  2018-09-29 10:30 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Jisheng Zhang @ 2018-09-29  5:20 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior, Greg Kroah-Hartman, Phil Edworthy
  Cc: linux-serial, linux-kernel, linux-arm-kernel

Hi,

Recently I found I could trigger sleep in atomic bug on berlin after commit
d76c74387e1c ("serial: 8250_dw: Fix runtime PM handling"). The path looks like:

dw8250_probe => serial850_register_8250_port => uart_add_one_port=>
register_console => console_unlock => univ8250_console_write =>
serial8250_console_write => serial8250_rpm_get => pm_runtime_get_sync

The irq is disabled by printk_safe_enter_irqsave() in console_unlock, but
pm_runtime_get_sync can't be called in atomic context...

I guess the reason why we didn't notice it is due to the fact that
only OMAP and DW sets UART_CAP_RPM currently, and DW set the flag in
May 2018.

Per my understanding, the bug sits in the 8250 core driver rather than
8250_dw.c.

Thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-01 18:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-29  5:20 [BUG] sleep in atomic in 8250 runtime PM code path Jisheng Zhang
2018-09-29 10:30 ` Russell King - ARM Linux
2018-10-01 18:04   ` Tony Lindgren
2018-10-01 18:21     ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).