Date: Wed, 30 Apr 2003 09:37:46 +0200 (CEST) From: Harti Brandt <brandt@fokus.fraunhofer.de> To: Nate Lawson <nate@root.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/fxp if_fxp.c if_fxpvar.h Message-ID: <20030430093448.U31027@beagle.fokus.fraunhofer.de> In-Reply-To: <Pine.BSF.4.21.0304291101001.75697-100000@root.org> References: <Pine.BSF.4.21.0304291101001.75697-100000@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 29 Apr 2003, Nate Lawson wrote: NL>On Mon, 28 Apr 2003, Warner Losh wrote: NL>> 2) Call FXP_UNLOCK() before calling bus_teardown_intr to avoid NL>> a possible deadlock reported by jhb. NL> NL>This adds a race since fxp_intr could occur after the unlock but before NL>the bus_teardown_intr call. The reason why I tore down the intr while NL>holding the lock is so fxp_intr would be prevented from accessing the NL>device until it has been disabled. Then the normal checks in fxp_intr NL>(IFF_OACTIVE or whatever) would show the card is gone and return without NL>accessing it. I guess this is ok since ether_ifdetach is still called NL>with the lock held (since it is what clears IFF_OACTIVE) but I'm NL>interested in your thoughts. For what I know, you should not call ether_ifdetach with the card lock held. ether_ifdetach calls if_detach which in turn may lock the radix node head to remove routes. The lock order should be 1) radix node head, 2) interface not the other way around. harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030430093448.U31027>