Re: panic upon kldunload snd_ich (lor # 159)

From: Ariff Abdullah <skywizard_at_MyBSD.org.my>
Date: Thu, 15 Sep 2005 11:46:53 +0800
On Thu, 15 Sep 2005 10:45:09 +0900
Pyun YongHyeon <pyunyh_at_gmail.com> wrote:
> 
> That would be supposed to fix the LOR message. But I'd like to keep
> lock ordering between snd_mutex and sndstat_lock. Since sndstat_read()
> could be called at any time there is an implicit lock order.
> I think switching to sx lock from mutex in sndstat code was to allow
> uiomove with lock held. IMO, it would be even better to rewrite
> sndstat_read() without using uiomove such that it can also use
> standard mutex rather than sx lock.
> 
I tend to agree with you. Since that sndstat_busy() isn't enough, how
about we acquire the entire sndstat so nobody can monkey with it (as the
proposed / attached diff) and at the same time avoiding this LOR
message. It seems much better rather than locking sndstat after
sndstat_busy() and much of pcm_unregister() procedures, only to find out
that somebody acquire it within that moment.



--

Ariff Abdullah
MyBSD

http://www.MyBSD.org.my (IPv6/IPv4)
http://staff.MyBSD.org.my (IPv6/IPv4)
http://tomoyo.MyBSD.org.my (IPv6/IPv4)

Received on Thu Sep 15 2005 - 01:47:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:43 UTC