cvs commit: src/sys/dev/re if_re.c

M. Warner Losh imp at
Sun Sep 18 10:00:48 PDT 2005

In message: <20050918163457.GA43796 at>
            Ruslan Ermilov <ru at> writes:
: That's clear.  I'm talking about fixing all drivers for the
: BPF detach bug.

The more I think about it, the more I think you may have been right
about a flag.  While I recoiled against it at first, I think that it
is the only long term solution to these kinds of bugs.

The reason I think this is that we have a number of races on detach.
The bpf one is just an annoying one right now, but what if dhclient
does an ioctl while we're detaching.  What if there's an ifconfig done
during the detach, etc.  Sure, we can fix the bpf case using the
complicated logic that was worked out here, but that still leaves a
number of other races to worry about.

If we're going to fix all the drivers in the tree, I think we should
add a 'dying' flag that we could use for the ioctl (and other)
requests to return an error and do nothing.

The other option would be to move this up a layer.  For device nodes,
for example, we connect them to deadfs early in the destruction
process.  If we did something similar to the ifnet entry points, then
we would fix all the drivers with one fell swoop, rather than doing it


More information about the cvs-src mailing list