LOR in if_detach

M. Warner Losh imp at bsdimp.com
Sat Apr 12 20:09:33 PDT 2003


In message: <0HD7006Z9O9T0N at mta5.snfc21.pbi.net>
            Jeffrey Hsu <hsu at freebsd.org> writes:
:   > Do you think of something like the following?
: 
:   > static int
:   > foo_detach(device_t dev)
:   > {
:   > ...
:   >
:   >	LOCK(softc);
: 
: The other big race here is between detach and the next attach.
: This is better solved with a lock at the interface layer rather
: than on the softc.

I'm working on locking at the newbus level, which should solve that
problem.  Since all changes to the dev tree are going to be under a
global lock, this race is eliminated.

My big problem is LOR when I enable this code in my tree :-(

Warner


More information about the freebsd-current mailing list