Re: [PATCH v3] usb: core: hcd: flush giveback work on stop

From: Michal Pecio

Date: Sun Oct 25 2026 - 12:10:46 EST


On Sun, 25 Oct 2026 11:16:59 -0400, Alan Stern wrote:
> > > > + * Even though all URBs have been given back,
> > >
> > > but does anyone actually believe this here?
> > >
> > > Hundreds of drivers written over three decades, often
> > > without linux-usb review. I don't trust them at all.
>
> If it's not true, there's likely to be trouble when the completion
> handler is called. We could forcibly remove any remaining URBs from
> the lists before flushing the work item and just leak them (with a
> warning of some sort -- ideally, one that prints out the names of the
> completion handler routines for the leaked URBs, if at all possible).

But you are now talking about developing a whole new feature of
unclear usefulness (will anyone pay attention to those logs?),
while my suggestion is merely a small tweak which costs nothing
and makes no functional difference under normal circumstances,
but reduces severity of hypothetical failures.

Regards,
Michal