kernel_samsung_a53x/drivers/usb
Thinh Nguyen db9be3536b usb: dwc3: gadget: Fix looping of queued SG entries
commit b7fc65f5141c24785dc8c19249ca4efcf71b3524 upstream.

The dwc3_request->num_queued_sgs is decremented on completion. If a
partially completed request is handled, then the
dwc3_request->num_queued_sgs no longer reflects the total number of
num_queued_sgs (it would be cleared).

Correctly check the number of request SG entries remained to be prepare
and queued. Failure to do this may cause null pointer dereference when
accessing non-existent SG entry.

Cc: stable@vger.kernel.org
Fixes: c96e6725db9d ("usb: dwc3: gadget: Correct the logic for queuing sgs")
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/d07a7c4aa0fcf746cdca0515150dbe5c52000af7.1731545781.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:24:20 +01:00
..
atm usb: atm: cxacru: fix endpoint checking in cxacru_bind() 2024-11-19 14:19:34 +01:00
c67x00
cdns3
chipidea Revert "usb: chipidea: udc: enable suspend interrupt after usb reset" 2024-11-24 00:22:58 +01:00
class Revert "USB: usbtmc: prevent kernel-usb-infoleak" 2024-11-24 00:23:31 +01:00
common
core usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes() 2024-11-23 23:20:55 +01:00
dwc2 Revert "usb: dwc2: Adjust the timing of USB Driver Interrupt Registration in the Crashkernel Scenario" 2024-11-24 00:22:58 +01:00
dwc3 usb: dwc3: gadget: Fix looping of queued SG entries 2024-12-17 13:24:20 +01:00
early
gadget Revert "usb: gadget: composite: fix OS descriptors w_value logic" 2024-12-17 13:24:18 +01:00
host usb: ehci-spear: fix call balance of sehci clk handling routines 2024-12-17 13:24:17 +01:00
image
isp1760
misc USB: chaoskey: Fix possible deadlock chaoskey_list_lock 2024-12-17 13:24:16 +01:00
mon
mtu3
musb usb: musb: sunxi: Fix accessing an released usb phy 2024-11-30 02:33:26 +01:00
notify
notify_lsi
phy usb: phy: Fix API devm_usb_put_phy() can not release the phy 2024-11-23 23:22:04 +01:00
renesas_usbhs
roles
serial USB: serial: option: add Quectel RG650V 2024-11-30 02:33:26 +01:00
storage Revert "usb: uas: set host status byte on data completion error" 2024-11-24 00:23:42 +01:00
typec mfd: intel_soc_pmic_bxtwc: Use IRQ domain for USB Type-C device 2024-12-17 13:24:08 +01:00
usbip usbip: Don't submit special requests twice 2024-11-23 23:20:58 +01:00
Kconfig
Kconfig.variant1
Makefile
Makefile.variant1
usb-skeleton.c