diff options
author | green <green@FreeBSD.org> | 2002-07-25 04:49:45 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2002-07-25 04:49:45 +0000 |
commit | de2cfb0a7a345b657b83e8a56d35a723fc436192 (patch) | |
tree | 5c72f4c9c3de7b3c307d1b3e261f39f93e56ad6a /sys/dev/sound/pcm/mixer.c | |
parent | 891c9fcb896ad87afa576f252cb60c125f96ac38 (diff) | |
download | FreeBSD-src-de2cfb0a7a345b657b83e8a56d35a723fc436192.zip FreeBSD-src-de2cfb0a7a345b657b83e8a56d35a723fc436192.tar.gz |
Fix some of the places where sound(4) can sleep with a lock held. (Help
courtesy of fenner).
Diffstat (limited to 'sys/dev/sound/pcm/mixer.c')
-rw-r--r-- | sys/dev/sound/pcm/mixer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 34dbcbd..7c1bd04 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -300,7 +300,9 @@ sysctl_hw_snd_hwvol_mixer(SYSCTL_HANDLER_ARGS) m = oidp->oid_arg1; snd_mtxlock(m->lock); strncpy(devname, snd_mixernames[m->hwvol_mixer], sizeof(devname)); + snd_mtxunlock(m->lock); error = sysctl_handle_string(oidp, &devname[0], sizeof(devname), req); + snd_mtxlock(m->lock); if (error == 0 && req->newptr != NULL) { dev = mixer_lookup(devname); if (dev == -1) { |