From: sashiko-bot@kernel.org
To: "Hongyu Xie" <xiehongyu1@kylinos.cn>, linux-usb@vger.kernel.org
Subject: Re: [PATCH v5 2/2] usb-storage: ene_ub6250: don't let the card-type probe hang forever
Date: Fri, 13 Nov 2026 07:46:12 +0000 [thread overview]
Message-ID: <sashiko-outbox-212364@kernel.org> (raw)
In-Reply-To: <20261113073638.1225998-3-xiehongyu1@kylinos.cn>
> ene_ub6250_probe() reads the card type with ene_get_card_type() right
> after usb_stor_probe2() has added the SCSI host. The query is a
> bulk-only transaction (CBW, one-byte data-in, CSW) sent through
> ene_send_scsi_cmd(), which uses usb_stor_bulk_transfer_buf() and
> therefore waits for URB completion without any timeout. That is safe
> only for transfers belonging to a SCSI command, where the command's
> timeout and abort handling terminate the wait. A card-type query has
> no SCSI command behind it, so a device which enumerates but never
> services bulk transfers blocks the probe forever.
>
> commit 445fc368c6bc ("usb-storage: ene_ub6250: fix race between scan
> work and probe") added us->dev_mutex around the query to keep it from
> racing with the scan work for us->current_urb. usb_stor_probe2()
> queues that work with a one-second delay, so it now waits for a
> transfer which may never finish. The query itself has been unbounded
> [ ... ]
> Closes: https://syzkaller.appspot.com/bug?extid=30552b4cbe99d6d91306
> Fixes: 445fc368c6bc ("usb-storage: ene_ub6250: fix race between scan work and probe")
> Cc: Liu Qi <liuqi@longcheer.com>
> Cc: stable@vger.kernel.org # 7.3.x: e350e5b223e1: add usb_stor_bulk_transfer_buf_timeout()
> Signed-off-by: Hongyu Xie <xiehongyu1@kylinos.cn>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261113073638.1225998-1-xiehongyu1@kylinos.cn?part=2
prev parent reply other threads:[~2026-11-13 7:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 8:54 [PATCH v4] usb-storage: ene_ub6250: don't let the card-type probe hang forever Hongyu Xie
2026-11-09 9:04 ` sashiko-bot
2026-11-11 15:51 ` [usb-storage] " Alan Stern
2026-11-13 7:36 ` [PATCH v5 0/2] usb-storage: bound the ene_ub6250 probe-time card-type query Hongyu Xie
2026-11-13 7:36 ` [PATCH v5 1/2] usb-storage: add usb_stor_bulk_transfer_buf_timeout() Hongyu Xie
2026-11-13 7:39 ` sashiko-bot
2026-11-13 7:36 ` [PATCH v5 2/2] usb-storage: ene_ub6250: don't let the card-type probe hang forever Hongyu Xie
2026-11-13 7:46 ` sashiko-bot [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=sashiko-outbox-212364@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=xiehongyu1@kylinos.cn \
/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