Page MenuHomeFreeBSD

sound: Busy the device being inspected, not the caller's
AbandonedPublic

Authored by christos on Thu, Oct 8, 1:09 PM.
Tags
None
Referenced Files
F175272130: D60465.id189171.diff
Fri, Oct 9, 3:18 PM
F175259331: D60465.id189171.diff
Fri, Oct 9, 12:31 PM
F175259114: D60465.id189171.diff
Fri, Oct 9, 12:29 PM
F175247613: D60465.diff
Fri, Oct 9, 10:11 AM
F175207158: D60465.diff
Fri, Oct 9, 2:41 AM
F175202490: D60465.id189050.diff
Fri, Oct 9, 1:53 AM
F175194960: D60465.diff
Fri, Oct 9, 12:34 AM
F175161159: D60465.diff
Thu, Oct 8, 6:36 PM
Subscribers

Details

Reviewers
markj
emaste
kib
Summary

The SNDCTL_*INFO ioctls can report info about any device in the system,
not only the one they were issued on. Both dispatchers unnecessarily
busied the caller's device first. The caller's device is kept alive
anyway, until destroy_dev() drains the cdev threadcount.

Busying the wrong device also prevented the handlers from busying the
one they actually want to report info on, because this would recurse on
the sx whenever the two were the same, so they walked the channel lists
under PCM_LOCK instead.

Busy each device as it is inspected, and give up the topology lock once
it is busied rather than holding it across the walks.

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 77847
Build 74730: arc lint + arc unit

Event Timeline

christos retitled this revision from sound: Drop the topology lock after busying the device to sound: Busy the device being inspected, not the caller's.Fri, Oct 9, 8:39 AM
christos edited the summary of this revision. (Show Details)
christos edited the summary of this revision. (Show Details)

Stop taking the sx unnecessarily for the device the ioctl has been issued on,
and instead take it for every device being inspected when needed.