linux/drivers/usb/gadget/udc
Greg Kroah-Hartman 41f71deda1 Merge patch series "usb: gadget: Refactor function drivers to use __free() cleanup"
Kuen-Han Tsai <khtsai@google.com> says:

This patch series refactors the error-handling paths in the bind()
function for f_ncm, f_acm, f_ecm, and f_rndis drivers.

The current, unified goto logic in these drivers is vulnerable to a null
pointer dereference. This is caused by the cleanup logic incorrectly
handling the stale usb_request pointer after a bind/unbind cycle. This
series fixes this issue by converting the drivers to use the modern
__free() scope-based cleanup mechanism.

Patches 1-2 are preparatory, adding the endpoint pointer to struct
usb_request and defining helpers for the __free() cleanup. The remaining
four patches use this new plumbing to refactor each driver.

Future work
-----------
1. Refactor usb_ep_free_request(), usb_ep_queue(), and usb_ep_dequeue()
   functions as the ep parameter becomes redudant.
2. Convert the remaining gadget function drivers to use the new __free()
   cleanup mechanism.

Link: https://lore.kernel.org/r/20250916-ready-v1-0-4997bf277548@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-17 12:44:55 +02:00
..
aspeed-vhub usb: gadget: aspeed: Add NULL pointer check in ast_vhub_init_dev() 2025-03-14 09:17:26 +01:00
bdc Merge 6.12-rc3 into usb-next 2024-10-14 08:03:44 +02:00
cdns2 cdns2: Remove unused tracepoints 2025-09-06 15:23:39 +02:00
Kconfig usb: Remove orphaned UDC drivers 2025-04-11 16:11:25 +02:00
Makefile usb: Remove orphaned UDC drivers 2025-04-11 16:11:25 +02:00
amd5536udc.h USB: gadget: udc: Remove some dead code 2021-10-10 15:12:34 +02:00
amd5536udc_pci.c usb: gadget: udc: fix NULL dereference in remove() 2023-05-29 15:24:24 +01:00
aspeed_udc.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
at91_udc.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
at91_udc.h usb: gadget: at91_udc: Convert to GPIO descriptors 2021-11-17 14:41:15 +01:00
atmel_usba_udc.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
atmel_usba_udc.h
bcm63xx_udc.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
core.c Merge patch series "usb: gadget: Refactor function drivers to use __free() cleanup" 2025-09-17 12:44:55 +02:00
dummy_hcd.c USB: gadget: dummy-hcd: Fix locking bug in RT-enabled kernels 2025-09-06 15:29:50 +02:00
fsl_qe_udc.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
fsl_qe_udc.h
fsl_udc_core.c USB: gadget: Use str_enable_disable-like helpers 2025-01-15 18:28:13 +01:00
fsl_usb2_udc.h usb: gadget: fsl-udc: Replace custom log wrappers by dev_{err,warn,dbg,vdbg} 2024-03-05 13:29:03 +00:00
goku_udc.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
goku_udc.h
gr_udc.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
gr_udc.h
lpc32xx_udc.c usb: gadget: lpc32xx_udc: Use USB API functions rather than constants 2025-05-21 13:13:24 +02:00
m66592-udc.c usb: gadget: m66592-udc: Use USB API functions rather than constants 2025-06-19 12:23:59 +02:00
m66592-udc.h
max3420_udc.c usb: gadget: max3420_udc: Follow renaming of SPI "master" to "controller" 2024-02-08 11:54:57 +00:00
net2280.c usb: gadget: net2280: Use USB API functions rather than constants 2025-06-19 12:24:06 +02:00
net2280.h
omap_udc.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
omap_udc.h
pch_udc.c usb: gadget: pch_udc: Use USB API functions rather than constants 2025-06-19 12:24:05 +02:00
pxa25x_udc.c usb: gadget: pxa25x_udc: Switch to use devm_gpio_request_one() 2025-06-10 09:59:54 +02:00
pxa25x_udc.h ARM: pxa: lubbock: pass udc irqs as resource 2022-05-07 22:55:47 +02:00
pxa27x_udc.c USB: gadget: Use str_enable_disable-like helpers 2025-01-15 18:28:13 +01:00
pxa27x_udc.h usb: gadget: pxa27x_udc: clean up comment 2022-04-21 19:20:42 +02:00
r8a66597-udc.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
r8a66597-udc.h
renesas_usb3.c usb: gadget: udc: renesas_usb3: fix device leak at unbind 2025-07-25 10:50:43 +02:00
renesas_usbf.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
rzv2m_usb3drd.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
snps_udc_core.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
snps_udc_plat.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
tegra-xudc.c usb: gadget: tegra-xudc: Remove redundant ternary operators 2025-09-06 15:32:32 +02:00
trace.c
trace.h usb: udc: Add trace event for usb_gadget_set_state 2025-09-12 14:03:14 +02:00
udc-xilinx.c usb: gadget: udc-xilinx: Use USB API functions rather than constants 2025-06-19 12:24:03 +02:00