PERFORCE change 144991 for review
Hans Petter Selasky
hselasky at freebsd.org
Fri Jul 11 10:33:55 UTC 2008
On Friday 11 July 2008, Alexander Leidinger wrote:
> Quoting Hans Petter Selasky <hselasky at FreeBSD.org> (from Thu, 10 Jul
>
> 2008 07:57:37 GMT):
> > http://perforce.freebsd.org/chv.cgi?CH=144991
> >
> > Change 144991 by hselasky at hselasky_laptop001 on 2008/07/10 07:56:37
> >
> >
> > These patches into the USB sound system are needed to make
> > the Giant-free USB audio driver work seamlessly.
>
> If the mixer uninit can sleep, there's the possibility for a race,
> isn't it? How do you make sure there's no race after not locking the
> mixer?
>
> What about a different approach:
> - keep the generic sound code as it is (locking of the mixer)
> - add some uninit flag to the mixer private data
> - check the flag
> + if it is not set on uninit, set it
> + if it is set on uninit (and maybe other mixer operations), abort
> - unlock the mutex in the uninit
> - do what can sleep
> - lock the mutex
> - return
>
> Bye,
> Alexander.
Detach and uninit routines should always be allowed to sleep in my opinion.
Ariff: Is there any reason for keeping the mixer lock locked accross the
UNINIT routine? I think this was done unintentionally.
--HPS
More information about the p4-projects
mailing list