mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
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
This commit is contained in:
parent
de5d99354f
commit
081d19aecd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58274
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user