[PATCH 0/2] usb: gadget: avoid warnings during configuration transitions
From: Keisuke Tsukuda
Date: Mon Sep 07 2026 - 05:05:59 EST
Rapidly alternating SET_CONFIGURATION requests can overtake the
mass-storage function's asynchronous configuration work. This exposes two
states that are handled safely but currently produce kernel warnings: a
delayed-status completion after reset_config() cleared its counter, and a
class request while common->fsg is not installed.
The first patch keeps the obsolete completion as a dynamic-debug
diagnostic. The second avoids the warning only in fsg_setup(), where the
request is already rejected with -EOPNOTSUPP; warnings in other internal
f_mass_storage paths remain unchanged.
Both reports reproduce on an ARM64 Ubuntu 6.8 VM using dummy_hcd. With both
patches loaded, five 10-second, four-thread runs produced no WARNING, BUG,
or Oops. In a separate run, a kprobe observed five calls to
usb_composite_setup_continue() with delayed_status == 0 while the target
warning remained absent.
syzbot tested this exact series on usb-testing commit
edc1518454f6439e50a9220e9a3ba09044ea8d8b and reported OK after a
50-minute run:
https://syzkaller.appspot.com/bug?extid=a83a5a1ba9ff57935171
Keisuke Tsukuda (2):
usb: gadget: composite: avoid warning on aborted delayed status
usb: gadget: f_mass_storage: ignore class requests while inactive
drivers/usb/gadget/composite.c | 2 +-
drivers/usb/gadget/function/f_mass_storage.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.50.1 (Apple Git-155)