Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 May 2004 10:27:25 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-hackers@FreeBSD.org
Cc:        Don Lewis <truckman@FreeBSD.org>
Subject:   Re: non-recursive mutex, sbc, pcm, kernel panic
Message-ID:  <200405101027.25456.jhb@FreeBSD.org>
In-Reply-To: <200405091941.i49Jev7E096965@gw.catspoiler.org>
References:  <200405091941.i49Jev7E096965@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 09 May 2004 03:40 pm, Don Lewis wrote:
> Typically the proper fix in this case would be to remove the
> sb_lock() call from sb_reset_dsp() and always let the caller do the
> locking.  The patch below should do the trick, though I believe the
> added locking and unlocking (the second section of the patch) could be
> omitted in sb16_attach() since no other thread can access the device
> while the attach is in progress.

Just a nit: I would add an assertion that the lock is held when sb_reset_dsp() 
is called as both documentation and to ensure that all callers hold it during 
testing and future development.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405101027.25456.jhb>