Page MenuHomeFreeBSD

sound: Shut the channels down with the device busied
Needs ReviewPublic

Authored by christos on Fri, Oct 9, 7:43 AM.
Tags
None
Referenced Files
F175713331: D60505.id189168.diff
Mon, Oct 12, 5:24 PM
F175639805: D60505.id189168.diff
Mon, Oct 12, 5:38 AM
Unknown Object (File)
Sun, Oct 11, 3:14 PM
Unknown Object (File)
Sun, Oct 11, 12:31 PM
Unknown Object (File)
Sun, Oct 11, 6:42 AM
Unknown Object (File)
Sat, Oct 10, 3:54 PM
Unknown Object (File)
Sat, Oct 10, 10:30 AM
Unknown Object (File)
Sat, Oct 10, 7:30 AM
Subscribers

Details

Reviewers
markj
emaste
kib
Summary

chn_shutdownall() walks channels.pcm with no lock held, and instead
relies on SD_F_REGISTERED being cleared to prevent other threads from
adding or removing channels. dsp_close() checks that flag before busying
the device, though, so a close that passed the check right before
pcm_unregister() cleared the flag can go on and modify the channel list.

Hold the sx across chn_shutdownall() and also assert it.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

Diff Detail

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