disconnect handling misdesigned on uss720
Oliver Neukum <[email protected]> Thu, 30 Jul 2026 15:24:21 +0200
| Newsgroups | org.kernel.vger.linux-usb |
|---|---|
| Message-ID | <[email protected]> |
Hi,
looking at this:
static unsigned int kill_all_async_requests_priv(struct parport_uss720_private *priv)
{
struct uss720_async_request *rq;
unsigned long flags;
unsigned int ret = 0;
spin_lock_irqsave(&priv->asynclock, flags);
list_for_each_entry(rq, &priv->asynclist, asynclist) {
usb_unlink_urb(rq->urb);
ret++;
}
spin_unlock_irqrestore(&priv->asynclock, flags);
return ret;
}
it seems to me that this is a broken design.
It uses only usb_unlink_urb() but does not wait for the actual
unlink. It seems to me that we need to count them and _wait_
for the count to reach 0.
What do you think?
Regards
Oliver