linux-yocto/drivers/tty
Ryo Takakura 5d29f884fe serial: sifive: lock port in startup()/shutdown() callbacks
commit e1ca3ff28ab1e2c1e70713ef3fa7943c725742c3 upstream.

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-05-02 07:59:11 +02:00
..
hvc tty: hvc: convert comma to semicolon 2024-09-03 10:47:56 +02:00
ipwireless
serdev serdev: Use of_property_present() 2024-08-07 13:08:14 +02:00
serial serial: sifive: lock port in startup()/shutdown() callbacks 2025-05-02 07:59:11 +02:00
vt tty: Require CAP_SYS_ADMIN for all usages of TIOCL_SELMOUSEREPORT 2025-05-02 07:59:10 +02:00
amiserial.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00
ehv_bytechan.c
goldfish.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00
Kconfig
Makefile
mips_ejtag_fdc.c tty: mips_ejtag_fdc: fix one more u8 warning 2025-02-08 09:57:59 +01:00
moxa.c
mxser.c mxser: convert comma to semicolon 2024-09-03 10:47:47 +02:00
n_gsm.c tty: n_gsm: Fix use-after-free in gsm_cleanup_mux 2024-10-11 08:28:17 +02:00
n_hdlc.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00
n_null.c
n_tty.c tty: n_tty: use uint for space returned by tty_write_room() 2025-04-10 14:39:26 +02:00
nozomi.c
pty.c
rpmsg_tty.c
synclink_gt.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00
sysrq.c Linux 6.11-rc1 2024-07-30 09:30:11 -10:00
tty_audit.c
tty_baudrate.c
tty_buffer.c
tty_io.c tty: ldsic: fix tty_ldisc_autoload sysctl's proc_handler 2024-12-05 14:02:46 +01:00
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c tty: add the option to have a tty reject a new ldisc 2024-05-04 18:45:11 +02:00
tty_ldsem.c
tty_mutex.c
tty_port.c
tty.h
ttynull.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00
vcc.c