kernel_samsung_a53x/drivers/tty/serial
Daniel Thompson f8a1ce28e1 serial: kgdboc: Fix NMI-safety problems from keyboard reset code
commit b2aba15ad6f908d1a620fd97f6af5620c3639742 upstream.

Currently, when kdb is compiled with keyboard support, then we will use
schedule_work() to provoke reset of the keyboard status.  Unfortunately
schedule_work() gets called from the kgdboc post-debug-exception
handler.  That risks deadlock since schedule_work() is not NMI-safe and,
even on platforms where the NMI is not directly used for debugging, the
debug trap can have NMI-like behaviour depending on where breakpoints
are placed.

Fix this by using the irq work system, which is NMI-safe, to defer the
call to schedule_work() to a point when it is safe to call.

Reported-by: Liuye <liu.yeC@h3c.com>
Closes: https://lore.kernel.org/all/20240228025602.3087748-1-liu.yeC@h3c.com/
Cc: stable@vger.kernel.org
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240424-kgdboc_fix_schedule_work-v2-1-50f5a490aec5@linaro.org
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 12:26:50 +01:00
..
8250 serial: Lock console when calling into driver before registration 2024-11-19 09:22:18 +01:00
cpm_uart Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jsm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
21285.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
altera_jtaguart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
altera_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amba-pl010.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amba-pl011.c ARM: PL011: Fix DMA support 2024-11-18 12:11:46 +01:00
amba-pl011.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apbuart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apbuart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ar933x_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arc_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atmel_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atmel_serial.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm63xx_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clps711x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
digicolor-usart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dz.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dz.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
earlycon-arm-semihost.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
earlycon-riscv-sbi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
earlycon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efm32-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_tty.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_tty.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl_linflexuart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl_lpuart.c tty: serial: fsl_lpuart: avoid idle preamble pending if CTS is enabled 2024-11-19 09:22:39 +01:00
icom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
icom.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ifx6x60.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ifx6x60.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx.c serial: imx: Correct clock error message in function probe() 2024-11-18 12:12:50 +01:00
imx_earlycon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip22zilog.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip22zilog.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig serial: max310x: implement I2C support 2024-11-18 23:19:53 +01:00
kgdb_nmi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kgdboc.c serial: kgdboc: Fix NMI-safety problems from keyboard reset code 2024-11-19 12:26:50 +01:00
lantiq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpc32xx_hs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max310x.c serial: max310x: fix NULL pointer dereference in I2C instantiation 2024-11-19 09:22:15 +01:00
max3100.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
men_z135_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
meson_uart.c tty: serial: meson: fix hard LOCKUP on crtscts mode 2024-11-18 11:43:26 +01:00
milbeaut_usio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpc52xx_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mps2-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
msm_geni_serial_earlycon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
msm_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mux.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvebu-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxs-auart.c serial: mxs-auart: add spinlock around changing cts state 2024-11-19 11:32:38 +01:00
omap-serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
owl-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pch_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pic32_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pic32_uart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmac_zilog.c serial/pmac_zilog: Remove flawed mitigation for rx irq flood 2024-11-19 11:32:22 +01:00
pmac_zilog.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pnx8xxx_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pxa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom_geni_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rda-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rp2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sa1100.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
samsung_tty.c tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT 2024-11-19 08:44:58 +01:00
sb1250-duart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sc16is7xx.c serial: sc16is7xx: convert from _raw_ to _noinc_ regmap functions for FIFO 2024-11-19 09:22:41 +01:00
sccnxp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial-tegra.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial_core.c serial: Lock console when calling into driver before registration 2024-11-19 09:22:18 +01:00
serial_mctrl_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial_mctrl_gpio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial_txx9.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh-sci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh-sci.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sifive.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sirfsoc_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sirfsoc_uart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sprd_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st-asc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-usart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-usart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
suncore.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunhv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunsab.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunsab.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunsu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunzilog.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunzilog.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tegra-tcu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timbuart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timbuart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uartlite.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ucc_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vr41xx_siu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vt8500_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xilinx_uartps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00