From: Oliver Neukum <oneukum@suse.com>
To: USB list <linux-usb@vger.kernel.org>
Cc: kees@kernel.org
Subject: disconnect handling misdesigned on uss720
Date: Thu, 30 Jul 2026 15:24:21 +0200 [thread overview]
Message-ID: <dbeebb24-cccb-443f-aa61-86956995a823@suse.com> (raw)
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
reply other threads:[~2026-07-30 13:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dbeebb24-cccb-443f-aa61-86956995a823@suse.com \
--to=oneukum@suse.com \
--cc=kees@kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox