Re: [PATCH 0/6] ALSA: usb-audio: guard device-specific control transfers

From: Takashi Iwai

Date: Mon Aug 31 2026 - 04:06:29 EST


On Fri, 28 Aug 2026 01:21:37 +0200,
Will Porter wrote:
>
> Takashi confirmed that hardware access through usb_ctl_msg() should hold
> snd_usb_lock, and suggested guarding scarlett2_usb() as the central point
> for Scarlett2. This series adds that protection to the six device-specific
> paths identified by the RFC audit.
>
> Each guard covers a complete synchronous USB transaction. The guards are
> outside private data and USB mutexes when a resume callback could affect
> lock ordering.
>
> FCP holds one reference across its complete initialization sequence so
> runtime suspend cannot intervene between step zero, notification-URB setup,
> and the two initialization commands.
>
> Scarlett2 uses a dedicated unguarded helper only for the suspend-time config
> save. That call already runs inside the USB suspend callback. The guarded
> path covers normal controls and hwdep operations. The series does not claim
> to hold a PM reference across Scarlett2's asynchronous flash-erase interval.
>
> The affected devices were unavailable for runtime testing. I reproduced the
> failure mechanism with an Audient iD14 MkI mixer path before the RFC. I then
> built the complete sound/usb/ directory with the configuration from the
> running x86-64 distribution kernel (7.2.0-ogc4.1.fc44.x86_64):
>
> make olddefconfig
> make -j4 W=1 sound/usb/
>
> All six changed objects compiled without warnings, and the build linked
> sound/usb/snd-usb-audio.o. The series also passes scripts/checkpatch.pl
> --strict with no errors, warnings, or checks.
>
> Link: https://lore.kernel.org/r/20260824230302.27965-1-mrwillporter@xxxxxxxxx
>
> Will Porter (6):
> ALSA: usb-audio: Add PM guard to Studio 1810c controls
> ALSA: usb-audio: Add PM guards to US-16x08 transfers
> ALSA: usb-audio: Add PM guard to Scarlett meter reads
> ALSA: usb-audio: Guard Scarlett2 protocol transfers
> ALSA: usb-audio: Add PM guards to RME Digiface controls
> ALSA: usb-audio: Guard FCP protocol transfers

Applied all patches now. Thanks.


Takashi