]> git.baikalelectronics.ru Git - kernel.git/commit
serial: msm_serial: disable interrupts in __msm_console_write()
authorJohn Ogness <john.ogness@linutronix.de>
Fri, 6 May 2022 21:33:24 +0000 (23:39 +0206)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:22 +0000 (18:36 +0200)
commit3512b0230c2737c0b38481954be8264874e57168
tree813abf903a4bf7e4e95eacaa411efdb38b2dbf2f
parentd2ba2fd5a3756f440bc394f075d385de567f9689
serial: msm_serial: disable interrupts in __msm_console_write()

[ Upstream commit c89439f4996d6dab71d9e114d5039513fbdecbca ]

__msm_console_write() assumes that interrupts are disabled, but
with threaded console printers it is possible that the write()
callback of the console is called with interrupts enabled.

Explicitly disable interrupts using local_irq_save() to preserve
the assumed context.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Link: https://lore.kernel.org/r/20220506213324.470461-1-john.ogness@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/msm_serial.c