Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2003 09:17:01 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        brandt@fokus.fraunhofer.de
Cc:        nate@root.org
Subject:   Re: cvs commit: src/sys/dev/fxp if_fxp.c if_fxpvar.h
Message-ID:  <20030430.091701.112720131.imp@bsdimp.com>
In-Reply-To: <20030430093931.V31027@beagle.fokus.fraunhofer.de>
References:  <Pine.BSF.4.21.0304291101001.75697-100000@root.org> <20030429.122808.116092806.imp@bsdimp.com> <20030430093931.V31027@beagle.fokus.fraunhofer.de>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20030430093931.V31027@beagle.fokus.fraunhofer.de>
            Harti Brandt <brandt@fokus.fraunhofer.de> writes:
: On Tue, 29 Apr 2003, M. Warner Losh wrote:
: 
: MWL>In message: <Pine.BSF.4.21.0304291101001.75697-100000@root.org>
: 
: MWL>: >           4) Return immediately if gone is true in fxp_ioctl
: MWL>: >           5) Return immediately if gone is true in fxp_intr
: MWL>:
: MWL>: Not sure this approach is necessary.
: MWL>
: MWL>I am.  Otherwise ioctl panics with recursive locks when the card is
: MWL>detached.  A simple kld_unload if_fxp would provoke these races,
: MWL>including the recursive lock panic.
: 
: You can replace the pointers to ioctl and start with pointers to dummy
: functions. In fact, an if_dead(ifp) function which does just this would
: be nice to have.

ifdetach calls these ioctl to properly shutdown the network interface
before it goes away.  I don't think we should jump the gun and do a
if_dead and encourage its use until we have the driver level locking
stuff worked out.  Since drivers are leaves, any locking that's done
there now is likely going to have a lot of issues because the other
major kernel systems aren't completely locked yet.  I don't think it
would be time well spent to work out all the races until the rest of
the kernel is locked.  Too bad locking it is so much harder than
locking drivers :-(

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030430.091701.112720131.imp>