]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:53:07 +0000 (10:53 +0200)
commit1237fca203bf792c8716c14ccffc134c7f763cc9
treee05c38092ce82597c5e169327b11e0158a119f46
parentad6a4eb0ebfdd430f29866741caccb4829806ae2
serial: msm_serial: disable interrupts in __msm_console_write()

BugLink: https://bugs.launchpad.net/bugs/1982968
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/tty/serial/msm_serial.c