linux/drivers/tty
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
..
hvc s390: Convert MACHINE_IS_[LPAR|VM|KVM], etc, machine_is_[lpar|vm|kvm]() 2025-03-04 17:18:07 +01:00
ipwireless treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
serdev tty: serdev: drop serdev_controller_ops::write_room() 2025-03-20 08:00:51 -07:00
serial serial: sifive: lock port in startup()/shutdown() callbacks 2025-04-15 15:02:39 +02:00
vt tty: Require CAP_SYS_ADMIN for all usages of TIOCL_SELMOUSEREPORT 2025-04-11 16:59:19 +02:00
Kconfig TTY/Serial driver updates for 6.15-rc1 2025-04-02 18:17:33 -07:00
Makefile
amiserial.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ehv_bytechan.c tty: ehv_bytechan: convert to u8 and size_t 2023-12-08 12:02:37 +01:00
goldfish.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
mips_ejtag_fdc.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
moxa.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
mxser.c mxser: convert comma to semicolon 2024-09-03 10:47:47 +02:00
n_gsm.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
n_hdlc.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00
n_null.c tty: ldops: unify to u8 2023-08-11 21:12:47 +02:00
n_tty.c tty: n_tty: move more_to_be_read to the end of n_tty_read() 2025-03-20 08:00:51 -07:00
nozomi.c tty: nozomi: convert to u8 and size_t 2023-12-08 12:02:38 +01:00
pty.c fsnotify: use accessor to set FMODE_NONOTIFY_* 2025-02-07 10:27:26 +01:00
rpmsg_tty.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
synclink_gt.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
sysrq.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
tty.h tty: convert THROTTLE constants into enum 2023-10-03 14:31:16 +02:00
tty_audit.c tty: audit: do not use N_TTY_BUF_SIZE 2025-03-20 08:00:50 -07:00
tty_baudrate.c
tty_buffer.c tty: Don't include tty_buffer.h in tty.h 2024-02-18 18:59:59 +01:00
tty_io.c tty: tty_driver: document both {,__}tty_alloc_driver() properly 2025-03-20 08:00:51 -07:00
tty_ioctl.c tty: allow TIOCSLCKTRMIOS with CAP_CHECKPOINT_RESTORE 2023-12-15 14:20:03 +01:00
tty_jobctrl.c tty: tty_jobctrl: fix pid memleak in disassociate_ctty() 2023-09-18 11:14:43 +02:00
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/ldsem: Remove unused ldsem_down_write_trylock 2025-02-04 14:38:42 +01:00
tty_mutex.c
tty_port.c tty: switch tty_port::xmit_* to u8 2023-12-08 12:02:37 +01:00
ttynull.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00
vcc.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00