linux/drivers/usb
Hemant Kumar 43c4cab006 usb: gadget: Fix double free of device descriptor pointers
Upon driver unbind usb_free_all_descriptors() function frees all
speed descriptor pointers without setting them to NULL. In case
gadget speed changes (i.e from super speed plus to super speed)
after driver unbind only upto super speed descriptor pointers get
populated. Super speed plus desc still holds the stale (already
freed) pointer. Fix this issue by setting all descriptor pointers
to NULL after freeing them in usb_free_all_descriptors().

Fixes: f5c61225cf ("usb: gadget: Update function for SuperSpeedPlus")
cc: stable@vger.kernel.org
Reviewed-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
Link: https://lore.kernel.org/r/1619034452-17334-1-git-send-email-wcheng@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 08:57:48 +02:00
..
atm drivers: usb: atm: use pr_err() and pr_warn() instead of raw printk() 2020-12-09 15:22:51 +01:00
c67x00 usb/c67x00: Replace tasklet with work 2021-01-26 18:36:37 +01:00
cdns3 usb: cdnsp: Fixes issue with Configure Endpoint command 2021-04-12 20:19:23 +08:00
chipidea usb: chipidea: tegra: Silence deferred probe error 2021-03-23 12:50:32 +01:00
class USB: cdc-acm: fix TIOCGSERIAL implementation 2021-04-09 16:08:27 +02:00
common usb: common: move function's kerneldoc next to its definition 2021-03-10 09:37:17 +01:00
core USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet 2021-04-14 15:17:53 +02:00
dwc2 usb: dwc2: Add exit clock gating before removing driver 2021-04-13 12:25:12 +02:00
dwc3 usb: dwc3: gadget: Check for disabled LPM quirk 2021-04-14 15:58:33 +02:00
early usb: early: ehci-dbgp: convert to readl_poll_timeout_atomic() 2020-09-25 16:29:09 +02:00
gadget usb: gadget: Fix double free of device descriptor pointers 2021-04-22 08:57:48 +02:00
host usb: xhci-mtk: remove unused members 2021-04-14 16:42:20 +02:00
image USB: microtek: use set_host_byte() 2020-09-16 12:42:10 +02:00
isp1760 usb: isp1760-hcd: convert to readl_poll_timeout_atomic() 2020-09-25 16:30:05 +02:00
misc usb: misc: usbsevseg: update to use usb_control_msg_send() 2021-03-28 13:41:27 +02:00
mon
mtu3 usb: mtu3: drop CONFIG_OF 2021-03-26 14:47:19 +01:00
musb usb: musb: fix PM reference leak in musb_irq_work() 2021-04-09 16:02:44 +02:00
phy usb: phy: phy-mxs-usb: Use of_device_get_match_data() 2021-01-18 18:35:46 +01:00
renesas_usbhs usb: renesas_usbhs: fix error return code of usbhsf_pkt_handler() 2021-03-23 12:42:15 +01:00
roles usb: roles: Call try_module_get() from usb_role_switch_find_by_fwnode() 2021-04-09 16:07:03 +02:00
serial USB: serial: io_edgeport: fix memory leak in edge_startup 2021-03-09 09:05:37 +01:00
storage usb-storage: Add quirk to defeat Kindle's automatic unload 2021-03-17 21:30:15 +01:00
typec usb: typec: tcpm: Fix error while calculating PPS out values 2021-04-22 08:57:34 +02:00
usbip usbip: vudc: fix missing unlock on error in usbip_sockfd_store() 2021-04-12 10:29:50 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver 2020-12-29 12:36:13 +08:00
usb-skeleton.c