ALSA: usb-audio: guard device-specific control transfers
Status from this message: Applied all patches now. Thanks.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | ALSA: usb-audio: Add PM guard to Studio 1810c controlssound/ | +8 | 0 replies | |
| 2/6 | ALSA: usb-audio: Add PM guards to US-16x08 transferssound/ | +7 | 0 replies | |
| 3/6 | ALSA: usb-audio: Add PM guard to Scarlett meter readssound/ | +4 | 0 replies | |
| 4/6 | ALSA: usb-audio: Guard Scarlett2 protocol transferssound/ | +30 | 0 replies | |
| 5/6 | ALSA: usb-audio: Add PM guards to RME Digiface controlssound/ | +8 | 0 replies | |
| 6/6 | ALSA: usb-audio: Guard FCP protocol transferssound/ | +8 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/6] ALSA: usb-audio: guard device-specific control transfers
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.
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
sound/usb/fcp.c | 8 ++++++++ sound/usb/mixer_quirks.c | 8 ++++++++ sound/usb/mixer_s1810c.c | 8 ++++++++ sound/usb/mixer_scarlett.c | 4 ++++ sound/usb/mixer_scarlett2.c | 36 ++++++++++++++++++++++++++++++------ sound/usb/mixer_us16x08.c | 7 +++++++ 6 files changed, 65 insertions(+), 6 deletions(-)
base-commit: 58c1c30074a8d1179e17a0188cd695b2f416bf75
Signature · 1 line
2.47.3