From: Johan Hovold <johan@kernel.org>
To: Haowen Tu <tuhaowen@uniontech.com>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: serial: f81232: drain work on failed open
Date: Tue, 17 Nov 2026 13:35:45 +0100 [thread overview]
Message-ID: <avxKISailO0PDLZ8@hovoldconsulting.com> (raw)
In-Reply-To: <B2303336BB3BED22+20261116051024.3330549-1-tuhaowen@uniontech.com>
On Mon, Nov 16, 2026 at 01:10:24PM +0800, Haowen Tu wrote:
> The interrupt URB is submitted before usb_serial_generic_open() starts
> the bulk read URBs. A modem-status notification can therefore queue
> interrupt_work before a bulk read submission fails. A bulk read that
> completes before a later submission fails can also queue lsr_work.
>
> The error path kills the interrupt URB but does not drain either work
> item. The tty port is not initialized after a failed open, so the close
> callback, which normally flushes this work, is not called. If the device
> is then disconnected, the work can outlive the port private data it uses.
>
> Flush both work items after killing the interrupt URB. The generic open
> error path has already killed any submitted bulk read URBs, so neither
> source can queue more work at this point.
>
> Fixes: 87fe5adcd8de ("USB: f81232: implement read IIR/MSR with endpoint")
> Signed-off-by: Haowen Tu <tuhaowen@uniontech.com>
Applied for 7.4 with a CC stable tag. Thanks.
Johan
prev parent reply other threads:[~2026-11-17 12:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 5:10 [PATCH] USB: serial: f81232: drain work on failed open Haowen Tu
2026-11-17 12:35 ` Johan Hovold [this message]
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=avxKISailO0PDLZ8@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=tuhaowen@uniontech.com \
/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