]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC: r234932
authorpho <pho@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 9 May 2012 08:18:22 +0000 (08:18 +0000)
committerpho <pho@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 9 May 2012 08:18:22 +0000 (08:18 +0000)
commit8a3539438cc6d226a07b80d5b5880bb6d1e8ebf5
tree8b11293a61d7560e43437ea01dbbd787ec63b00c
parent83f74daadfcc18475fe1555ad77c6cd2ddb7f688
MFC: r234932

Added D_TRACKCLOSE to sndstat_cdevsw to fix the situation when
another process is in open() or stat() for the device node, then
close() from the owning process does not result in cdevsw close
method call. This fixes the pemanent "Device busy" seen.

Changed the sndstat_lock from mutex to sx.  This allows to extend
the region covered by the lock, to include the uiomove() call in
sndstat_read() and bufptr increment. This fixes the "panic:
sbuf_put_byte called with finished or corrupt sbuf" seen.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235157 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/sound/pcm/sndstat.c