LOR in if_detach
Harti Brandt
brandt at fokus.fraunhofer.de
Thu Apr 10 05:40:14 PDT 2003
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 at fokus.fraunhofer.de, harti at freebsd.org
More information about the freebsd-current
mailing list