Re: [PATCH] usb-storage: option_ms: bound probe-time bulk transfers

From: Jun

Date: Wed Oct 21 2026 - 03:27:45 EST


> So a broken device?

Yes, effectively. The reproducer emulates a USB device that completes
enumeration but does not respond to the subsequent bulk OUT transfer.
Without a timeout, the hub worker remains blocked while holding the
device mutex, preventing other operations such as usb_device_read()
from proceeding.

> That feels very long, are you sure that works well?

I've reduced the timeout to 5 seconds, using usb_modeswitch's 3
seconds timeout for similar bulk transfers as a reference, with some
additional margin.
I retested with the syzkaller reproducer under QEMU, and
initialization now proceeds after 5 seconds instead of 30.

> This should go below the --- line and is why sashiko is confused.

Thank you, I'll move the dependency note below the --- line

> No blank line above here is needed.

I'll remove the extra blank line.

Thanks for your review. I'll send v2 with these changes.

Lee Yongjun


2026년 10월 14일 (수) 오전 1:18, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>님이 작성:
>
> On Tue, Oct 13, 2026 at 10:20:33PM +0900, Lee Yongjun wrote:
> > The Option device initialization path issues bulk transfers
> > without a timeout. If a device does not complete a transfer,
> > the USB hub worker can remain blocked while holding the device
> > mutex, causing usb_device_read() to hang.
>
> So a broken device?
>
> > Use the timeout-aware bulk transfer helper for the transfers
> > in option_inquiry() and option_rezero(). This bounds the wait
> > for each probe-time transfer to 30 seconds.
>
> That feels very long, are you sure that works well?
>
> > Tested with the syzbot C reproducer under QEMU/KVM. The
> > patched kernel repeatedly completed USB device initialization
> > attempts after approximately 30 seconds without triggering
> > the previously observed hung-task warning.
> >
> > This patch depends on Hongyu Xie's pending v3 series:
> > https://lore.kernel.org/r/20261001123135.38831-1-xy521521@xxxxxxxxx/
>
> This should go below the --- line and is why sashiko is confused.
>
> > Fixes: 32ebbe7b6ad4 ("USB: usb-storage: add filter to "option_ms" to leave unrecognized devices alone")
> > Reported-by: syzbot+7317196294d50d6e55c3@xxxxxxxxxxxxxxxxxxxxxxxxx
> > Closes: https://syzkaller.appspot.com/bug?extid=7317196294d50d6e55c3
> > Assisted-by: LLM
> >
> > Signed-off-by: Lee Yongjun <jun85566@xxxxxxxxx>
>
> No blank line above here is needed.
>
> thanks,
>
> greg k-h