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
F175303399: D60505.id.diff
Fri, Oct 9, 7:33 PM
F175285459: D60505.id189168.diff
Fri, Oct 9, 4:42 PM
F175280960: D60505.id189168.diff
Fri, Oct 9, 4:15 PM
F175277872: D60505.diff
Fri, Oct 9, 4:04 PM
F175265633: D60505.diff
Fri, Oct 9, 2:00 PM
F175254469: D60505.id189168.diff
Fri, Oct 9, 11:23 AM
F175254457: D60505.diff
Fri, Oct 9, 11:23 AM
F175249501: D60505.id189168.diff
Fri, Oct 9, 10:28 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