From: Greg KH <gregkh@linuxfoundation.org>
To: liuqi <liuqi@longcheer.com>
Cc: linux-usb@vger.kernel.org, stable@vger.kernel.org,
syzbot+22ea20ef3afb6785b122@syzkaller.appspotmail.com
Subject: Re: [PATCH] usb-storage: ene_ub6250: serialize card type probe with scan work
Date: Fri, 21 Aug 2026 07:58:01 +0200 [thread overview]
Message-ID: <2026082128-hamstring-graph-b209@gregkh> (raw)
In-Reply-To: <20260821055358.1058653-1-liuqi@longcheer.com>
On Fri, Aug 21, 2026 at 01:53:58PM +0800, liuqi wrote:
> usb_stor_probe2() starts the usb-storage infrastructure and schedules
> the delayed scan work. The probe then calls ene_get_card_type(), which
> sends a command through ene_send_scsi_cmd() and the usb-storage bulk
> transfer helpers. These helpers use us->current_urb.
>
> The delayed scan work also uses us->current_urb when issuing GET_MAX_LUN
> through usb_stor_Bulk_max_lun(). The scan path is serialized with
> us->dev_mutex, but the post-usb_stor_probe2() ENE card-type probe is not.
>
> If the ENE card-type command is still in flight when the delayed scan
> work runs, the scan work can try to submit the same URB again, and
> usb_submit_urb() warns that the URB is already active.
>
> Serialize ene_get_card_type() with us->dev_mutex, matching the locking
> used by the scan path.
>
> Reported-by: syzbot+22ea20ef3afb6785b122@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=22ea20ef3afb6785b122
> Signed-off-by: liuqi <liuqi@longcheer.com>
Did you forget an Assisted-by: tag for this?
How was this tested?
And as before, we need a real name.
thanks,
greg k-h
next prev parent reply other threads:[~2026-08-21 5:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 5:53 [PATCH] usb-storage: ene_ub6250: serialize card type probe with scan work liuqi
2026-08-21 5:58 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-08-21 7:33 liuqi
2026-08-21 7:39 liuqi
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=2026082128-hamstring-graph-b209@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=liuqi@longcheer.com \
--cc=stable@vger.kernel.org \
--cc=syzbot+22ea20ef3afb6785b122@syzkaller.appspotmail.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