linux-yocto/drivers/usb
Kuen-Han Tsai 9e4af87bd0 Revert "usb: gadget: u_serial: Add null pointer check in gs_start_io"
commit f6c7bc4a68 upstream.

This reverts commit ffd603f214.

Commit ffd603f214 ("usb: gadget: u_serial: Add null pointer check in
gs_start_io") adds null pointer checks at the beginning of the
gs_start_io() function to prevent a null pointer dereference. However,
these checks are redundant because the function's comment already
requires callers to hold the port_lock and ensure port.tty and port_usb
are not null. All existing callers already follow these rules.

The true cause of the null pointer dereference is a race condition. When
gs_start_io() calls either gs_start_rx() or gs_start_tx(), the port_lock
is temporarily released for usb_ep_queue(). This allows port.tty and
port_usb to be cleared.

Fixes: ffd603f214 ("usb: gadget: u_serial: Add null pointer check in gs_start_io")
Cc: stable <stable@kernel.org>
Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
Reviewed-by: Prashanth K <prashanth.k@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250617050844.1848232-1-khtsai@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-17 18:37:12 +02:00
..
atm
c67x00
cdns3 usb: cdnsp: Fix issue with CV Bad Descriptor test 2025-07-10 16:05:11 +02:00
chipidea usb: chipidea: udc: disconnect/reconnect from host when do suspend/resume 2025-07-10 16:05:11 +02:00
class usb: cdc-wdm: avoid setting WDM_READ for ZLP-s 2025-07-06 11:01:35 +02:00
common usb: common: usb-conn-gpio: use a unique name for usb connector device 2025-07-06 11:01:35 +02:00
core Logitech C-270 even more broken 2025-07-10 16:05:12 +02:00
dwc2 usb: dwc2: also exit clock_gating when stopping udc while suspended 2025-07-06 11:01:34 +02:00
dwc3 usb: dwc3: Abort suspend on soft disconnect failure 2025-07-10 16:05:11 +02:00
early
fotg210
gadget Revert "usb: gadget: u_serial: Add null pointer check in gs_start_io" 2025-07-17 18:37:12 +02:00
host xhci: Disable stream for xHC controller with XHCI_BROKEN_STREAMS 2025-07-10 16:05:10 +02:00
image
isp1760
misc usb: misc: onboard_usb_dev: fix build warning for CONFIG_USB_ONBOARD_DEV_USB5744=n 2025-06-19 15:32:37 +02:00
mon
mtu3
musb
phy
renesas_usbhs usb: renesas_usbhs: Reorder clock handling and power management in probe 2025-06-19 15:32:11 +02:00
roles
serial USB: serial: pl2303: add new chip PL2303GC-Q20 and PL2303GT-2AB 2025-06-10 07:12:59 -04:00
storage usb: storage: Ignore UAS driver for SanDisk 3.2 Gen2 storage device 2025-06-10 07:12:59 -04:00
typec usb: typec: displayport: Fix potential deadlock 2025-07-10 16:05:13 +02:00
usbip
Kconfig
Makefile
usb-skeleton.c