Date: Thu, 10 Apr 2003 14:40:09 +0200 (CEST) From: Harti Brandt <brandt@fokus.fraunhofer.de> To: Jeffrey Hsu <hsu@FreeBSD.org> Cc: freebsd-current@FreeBSD.org Subject: Re: LOR in if_detach Message-ID: <20030410143518.B605@beagle.fokus.fraunhofer.de> In-Reply-To: <200304101219.h3ACJDHo011225@mta7.pltn13.pbi.net> References: <200304101219.h3ACJDHo011225@mta7.pltn13.pbi.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 10 Apr 2003, Jeffrey Hsu wrote: JH> > is there any insight on how to avoid an LOR in if_detach? JH> JH>Call if_detach() before you acquire the driver lock. I must stop the interface before calling if_detach. To stop it I need the lock. If I unlock after stoping before detaching, I get a race window where somebody could just UP the interface. While thinking about, it seems, that having a lock in struct ifnet would make sense in the long run. How can we otherwise ensure, that nobody is calling if_ioctl while we are detaching the interface? Hmmm... 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?20030410143518.B605>