linux-kernelorg-stable/drivers/tty/serial
Ryo Takakura e1ca3ff28a serial: sifive: lock port in startup()/shutdown() callbacks
startup()/shutdown() callbacks access SIFIVE_SERIAL_IE_OFFS.
The register is also accessed from write() callback.

If console were printing and startup()/shutdown() callback
gets called, its access to the register could be overwritten.

Add port->lock to startup()/shutdown() callbacks to make sure
their access to SIFIVE_SERIAL_IE_OFFS is synchronized against
write() callback.

Fixes: 45c054d081 ("tty: serial: add driver for the SiFive UART")
Signed-off-by: Ryo Takakura <ryotkkr98@gmail.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Cc: stable@vger.kernel.org
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Rule: add
Link: https://lore.kernel.org/stable/20250330003522.386632-1-ryotkkr98%40gmail.com
Link: https://lore.kernel.org/r/20250412001847.183221-1-ryotkkr98@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-15 15:02:39 +02:00
..
8250 treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
jsm
21285.c
Kconfig serial: tegra-utc: Add driver for Tegra UART Trace Controller (UTC) 2025-02-14 10:06:50 +01:00
Makefile serial: tegra-utc: Add driver for Tegra UART Trace Controller (UTC) 2025-02-14 10:06:50 +01:00
altera_jtaguart.c serial: altera_jtaguart: Use KBUILD_MODNAME 2024-12-04 16:35:53 +01:00
altera_uart.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
amba-pl010.c
amba-pl011.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
apbuart.c
apbuart.h
ar933x_uart.c
arc_uart.c
atmel_serial.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
atmel_serial.h
bcm63xx_uart.c
clps711x.c
cpm_uart.c TTY / Serial driver updates for 6.13-rc1 2024-11-30 09:03:16 -08:00
cpm_uart.h
digicolor-usart.c
dz.c
dz.h
earlycon-riscv-sbi.c
earlycon-semihost.c
earlycon.c
esp32_acm.c
esp32_uart.c
fsl_linflexuart.c
fsl_lpuart.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
icom.c serial: icom: fix code format problems 2025-03-20 08:10:40 -07:00
imx.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
imx_earlycon.c
ip22zilog.c
ip22zilog.h
kgdboc.c Revert "tty/serial: Add kgdb_nmi driver" 2025-02-14 10:05:43 +01:00
lantiq.c
liteuart.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
lpc32xx_hs.c
ma35d1_serial.c tty: serial: pl011: remove incorrect of_match_ptr annotation 2025-03-20 08:09:56 -07:00
max310x.c
max3100.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
mcf.c
men_z135_uart.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
meson_uart.c
milbeaut_usio.c
mpc52xx_uart.c serial: mpc52xx_uart: Remove legacy PM hook 2025-02-04 14:38:32 +01:00
mps2-uart.c
msm_serial.c serial: msm: Configure correct working mode before starting earlycon 2025-04-11 16:58:47 +02:00
mux.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
mvebu-uart.c
mxs-auart.c
omap-serial.c
owl-uart.c
pch_uart.c serial: pch_uart: Remove legacy PM hook 2025-02-04 14:38:36 +01:00
pic32_uart.c
pmac_zilog.c
pmac_zilog.h
pxa.c
qcom_geni_serial.c
rda-uart.c
rp2.c
sa1100.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
samsung_tty.c
sb1250-duart.c
sc16is7xx.c serial: sc16is7xx: Fix IRQ number check behavior 2025-02-04 14:42:42 +01:00
sc16is7xx.h
sc16is7xx_i2c.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
sc16is7xx_spi.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
sccnxp.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
serial-tegra.c
serial_base.h
serial_base_bus.c
serial_core.c TTY/Serial driver updates for 6.15-rc1 2025-04-02 18:17:33 -07:00
serial_ctrl.c
serial_mctrl_gpio.c serial: mctrl_gpio: split disable_ms into sync and no_sync APIs 2025-02-19 15:08:36 +01:00
serial_mctrl_gpio.h serial: mctrl_gpio: split disable_ms into sync and no_sync APIs 2025-02-19 15:08:36 +01:00
serial_port.c serial: port: Make ->iotype validation global in __uart_read_properties() 2025-02-04 14:44:44 +01:00
serial_txx9.c
sh-sci.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
sh-sci.h
sifive.c serial: sifive: lock port in startup()/shutdown() callbacks 2025-04-15 15:02:39 +02:00
sprd_serial.c
st-asc.c
stm32-usart.c serial: stm32: do not deassert RS485 RTS GPIO prematurely 2025-03-20 08:30:44 -07:00
stm32-usart.h
suncore.c
sunhv.c
sunplus-uart.c
sunsab.c
sunsab.h
sunsu.c tty: sunsu: remove unused serial_icr_read() 2025-03-20 08:00:51 -07:00
sunzilog.c
sunzilog.h
tegra-tcu.c
tegra-utc.c serial: tegra-utc: Add driver for Tegra UART Trace Controller (UTC) 2025-02-14 10:06:50 +01:00
timbuart.c
timbuart.h
uartlite.c
ucc_uart.c TTY / Serial driver updates for 6.13-rc1 2024-11-30 09:03:16 -08:00
vt8500_serial.c
xilinx_uartps.c serial: xilinx_uartps: Switch to use hrtimer_setup() 2025-02-20 15:38:34 +01:00
zs.c
zs.h