linux/drivers/usb/class
Oliver Neukum b41c1fa155 USB: class: CDC-ACM: fix race between get_serial and set_serial
TIOCGSERIAL is an ioctl. Thus it must be atomic. It returns
two values. Racing with set_serial it can return an inconsistent
result. The mutex must be taken.

In terms of logic the bug is as old as the driver. In terms of
code it goes back to the conversion to the get_serial and
set_serial methods.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Cc: stable <stable@kernel.org>
Fixes: 99f75a1fcd ("cdc-acm: switch to ->[sg]et_serial()")
Link: https://lore.kernel.org/r/20240912141916.1044393-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-09-13 07:53:52 +02:00
..
cdc-acm.c USB: class: CDC-ACM: fix race between get_serial and set_serial 2024-09-13 07:53:52 +02:00
cdc-acm.h USB: cdc-acm: use CDC serial-state defines 2022-07-25 10:57:41 +02:00
cdc-wdm.c USB: class: cdc-wdm: Fix CPU lockup caused by excessive log messages 2024-06-14 08:47:59 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
usblp.c USB: make devnode() callback in usb_class_driver take a const * 2022-10-20 12:11:56 +02:00
usbtmc.c USB: usbtmc: prevent kernel-usb-infoleak 2024-09-11 15:34:17 +02:00