Re: LOR in if_detach

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Sat, 12 Apr 2003 21:08:53 -0600 (MDT)
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
Received on Sat Apr 12 2003 - 18:09:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:03 UTC