LOR in if_detach
Jeffrey Hsu
hsu at FreeBSD.org
Thu Apr 10 05:51:45 PDT 2003
> I must stop the interface before calling if_detach.
The midway driver doesn't do that now anyways, so there's no reason to
start now.
> If I unlock after stoping before detaching, I get a race window
> where somebody could just UP the interface.
This race is outside the scope of the network driver lock.
> 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?
That's what I had planned.
Jeffrey
More information about the freebsd-current
mailing list