diff options
author | rwatson <rwatson@FreeBSD.org> | 2000-03-19 05:46:50 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2000-03-19 05:46:50 +0000 |
commit | 1a427b0d614c15b6d452ca2de1bf6bf32496951a (patch) | |
tree | a5f6db6a161baab3a58cf722eef4402b0b24cc1d | |
parent | 5b7df33ce063503bdebb25d8f4026d194b5d636b (diff) | |
download | FreeBSD-src-1a427b0d614c15b6d452ca2de1bf6bf32496951a.zip FreeBSD-src-1a427b0d614c15b6d452ca2de1bf6bf32496951a.tar.gz |
Modify if_wi.c to call bpfdetach(ifp) before if_detach(ifp), so as to
prevent a page fault if the card is ejected while BPF is in use. This
could happen if DHCP or tcpdump was in use on that interface during
ejection. Other drivers may also require this modification.
Reviewed by: wes
-rw-r--r-- | sys/dev/wi/if_wi.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/if_wi.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index e678b02..a75353e 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -214,6 +214,8 @@ static int wi_pccard_detach(dev) } wi_stop(sc); + + bpfdetach(ifp); if_detach(ifp); bus_teardown_intr(dev, sc->irq, sc->wi_intrhand); wi_free(dev); diff --git a/sys/i386/isa/if_wi.c b/sys/i386/isa/if_wi.c index e678b02..a75353e 100644 --- a/sys/i386/isa/if_wi.c +++ b/sys/i386/isa/if_wi.c @@ -214,6 +214,8 @@ static int wi_pccard_detach(dev) } wi_stop(sc); + + bpfdetach(ifp); if_detach(ifp); bus_teardown_intr(dev, sc->irq, sc->wi_intrhand); wi_free(dev); |