android_kernel_msm-6.1_noth.../drivers/usb
Prashanth K e60a827ac0 usb: gadget: u_serial: Add null pointer check in gserial_suspend
[ Upstream commit 2f6ecb89fe8feb2b60a53325b0eeb9866d88909a ]

Consider a case where gserial_disconnect has already cleared
gser->ioport. And if gserial_suspend gets called afterwards,
it will lead to accessing of gser->ioport and thus causing
null pointer dereference.

Avoid this by adding a null pointer check. Added a static
spinlock to prevent gser->ioport from becoming null after
the newly added null pointer check.

Fixes: aba3a8d01d ("usb: gadget: u_serial: add suspend resume callbacks")
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
Link: https://lore.kernel.org/r/1683278317-11774-1-git-send-email-quic_prashk@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-19 16:21:52 +02:00
..
atm
c67x00
cdns3 usb: cdns3: fix NCM gadget RX speed 20x slow than expection at iMX8QM 2023-06-09 10:34:20 +02:00
chipidea usb: chipidea: fix missing goto in ci_hdrc_probe 2023-05-11 23:03:30 +09:00
class USB: usbtmc: Fix direction for 0-length ioctl control messages 2023-05-24 17:32:48 +01:00
common USB: ULPI: fix memory leak with using debugfs_lookup() 2023-03-11 13:55:36 +01:00
core usb: usbfs: Use consistent mmap functions 2023-06-14 11:15:29 +02:00
dwc2 usb: dwc2: Fix some error handling paths 2023-07-19 16:21:49 +02:00
dwc3 usb: dwc3: qcom: Fix potential memory leak 2023-07-19 16:21:52 +02:00
early usb: early: xhci-dbc: Fix a potential out-of-bound memory access 2023-03-10 09:33:35 +01:00
gadget usb: gadget: u_serial: Add null pointer check in gserial_suspend 2023-07-19 16:21:52 +02:00
host xhci: Fix incorrect tracking of free space on transfer rings 2023-05-24 17:32:49 +01:00
image
isp1760
misc USB: sisusbvga: Add endpoint checks 2023-05-30 14:03:20 +01:00
mon
mtu3 usb: mtu3: fix kernel panic at qmu transfer done irq handler 2023-05-11 23:03:30 +09:00
musb usb: musb: mediatek: don't unregister something that wasn't registered 2023-03-10 09:33:35 +01:00
phy
renesas_usbhs
roles
serial USB: serial: option: add LARA-R6 01B PIDs 2023-07-19 16:21:45 +02:00
storage usb-storage: fix deadlock when a scsi command timeouts more than once 2023-05-24 17:32:48 +01:00
typec usb: typec: Fix fast_role_swap_current show function 2023-06-21 16:00:57 +02:00
usbip use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
Kconfig
Makefile
usb-skeleton.c