documenting the locking requirements? (was: Re: panic upon
kldunload snd_ich (lor # 159))
Alexander Leidinger
Alexander at Leidinger.net
Thu Sep 15 02:35:10 PDT 2005
Pyun YongHyeon <pyunyh at gmail.com> wrote:
> > 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.
> >
>
> I didn't try the patch but it looks good to me. :-)
> If you have more time would you please fix race in sndstat_open()?
>
> Minor note : I think it is better to use sx_xunlock ranther than
> sx_unlock as sx_xunlock clearly indicates which type of locks held.
Are the locking requirements (what needs to be locked and why/when, in which
order) in the sound code documented somewhere? If yes: where? If no: can I
convince you (either one or both of "you") to write something up (plain text
would be enough for a start)?
Bye,
Alexander.
--
http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137
Overheard:
"How do I feel? Great! And I kiss pretty good, too!"
More information about the freebsd-current
mailing list