Page MenuHomeFreeBSD

snd_uaudio: Do not use pcm_channel->lock to protect uaudio_chan
ClosedPublic

Authored by christos on Dec 6 2025, 2:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 19, 9:06 AM
Unknown Object (File)
Tue, Feb 17, 10:54 AM
Unknown Object (File)
Tue, Feb 10, 2:25 PM
Unknown Object (File)
Sat, Jan 31, 6:17 PM
Unknown Object (File)
Jan 29 2026, 7:59 PM
Unknown Object (File)
Jan 29 2026, 7:56 PM
Unknown Object (File)
Jan 29 2026, 4:33 PM
Unknown Object (File)
Jan 27 2026, 7:19 AM
Subscribers

Details

Summary

This is a layering violation, but it also makes the control flow
confusing; snd_uaudio(4) should have its own lock to protect its
structures.

Fixes: 5cc34a83e1 ("Revert "sound: Merge chn_intr() with chn_intr_locked()"")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69100
Build 65983: arc lint + arc unit

Event Timeline

What problem does this fix?

What problem does this fix?

From the commit referenced in "Fixes" (5cc34a83e1):

It turns out that snd_uaudio(4) uses sound(4)'s channel lock for its USB
transfer callbacks. I will try to address this at some point, because
this is layering violation, but for now we need to revert the commit, as
it causes a lock recursion panic with USB audio devices.

What problem does this fix?

From the commit referenced in "Fixes" (5cc34a83e1):

It turns out that snd_uaudio(4) uses sound(4)'s channel lock for its USB
transfer callbacks. I will try to address this at some point, because
this is layering violation, but for now we need to revert the commit, as
it causes a lock recursion panic with USB audio devices.

Bump.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 2 2026, 5:21 PM
This revision was automatically updated to reflect the committed changes.