Re: [PATCH] usb: gadget: bdc: Fix potential ep0 BD table leak

From: Florian Fainelli

Date: Tue Nov 10 2026 - 13:08:01 EST


On 11/10/26 06:32, Guangshuo Li wrote:
The ep0 BD list is kept across disconnects, and ep0 does not have
BDC_EP_ENABLED set after allocation. Consequently bdc_free_ep() skips
its tables before the BD table pool is destroyed.

Free an allocated ep0 BD list during final endpoint teardown.

This issue was found by our static analysis tool under development.

Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC")
Signed-off-by: Guangshuo Li <liguangshuo@xxxxxxxxxxxxxxx>

Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
--
Florian