Re: [PATCH] usb-storage: alauda: track media_initialized per port
From: Arbab Haider
Date: Sun Nov 22 2026 - 03:07:52 EST
On Sat, Nov 21, 2026 at 03:54:57PM -0500, Alan Stern wrote:
> Has this patch been tested?
Yes, tested in QEMU (x86_64, v7.4-rc3 with KASAN, UBSAN, dummy_hcd,
raw_gadget, and usb-storage alauda enabled). I do not have physical
Alauda hardware, so testing was done via dummy_hcd + raw_gadget:
- Before the patch: running the syzbot C reproducer reproduced the
UBSAN division-overflow / divide error in alauda_read_data()
(drivers/usb/storage/alauda.c:986) on LUN 1.
- After the patch: the syzbot reproducer passes with no UBSAN, KASAN,
or divide errors. I also verified additional raw_gadget scenarios:
* READ_CAPACITY and READ_10 on both LUN 0 and LUN 1
* Media removal (status 0x80) followed by re-insertion without the
0x08 media-change bit and READ_10
* Media change with a failing alauda_init_media() (unrecognized media
signature) followed by READ_10 and WRITE_10
* Recovery back to a valid media signature with TEST_UNIT_READY,
READ_CAPACITY, and READ_10
Regards,
Arbab