]> git.ipfire.org Git - thirdparty/kernel/stable.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 14:59:37 +0000 (16:59 +0200)
commit1b4e7e56616679d2cb3fc318b72057668a7f574c
tree43b6a9e06ba49722311a68a295164a6110448408
parenta6535d00a9d54ce1c2a8d86a85001ffb6844f9b2
serial: msm_serial: disable interrupts in __msm_console_write()

[ Upstream commit aabdbb1b7a5819e18c403334a31fb0cc2c06ad41 ]

__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