> Do you think of something like the following?
> static int
> foo_detach(device_t dev)
> {
> ...
>
> LOCK(softc);
The other big race here is between detach and the next attach.
This is better solved with a lock at the interface layer rather
than on the softc.
Jeffrey