]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC: r234932
authorpho <pho@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 9 May 2012 10:05:02 +0000 (10:05 +0000)
committerpho <pho@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 9 May 2012 10:05:02 +0000 (10:05 +0000)
commit067d58c9ddf321863cfcaed7165c6552d887f096
treec7d1d551bd958ff69184344137504630c1bc9213
parentfbeeaeae3e642f4e245fadb00adb0f5758977cc6
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/8@235160 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/sound/pcm/sndstat.c