freebsd-dev/sys
Robert Watson de5d99354f The advent of if_detach, allowing interface removal at runtime, makes it
possible for a panic to occur if BPF is in use on the interface at the
time of the call to if_detach.  This happens because BPF maintains pointers
to the struct ifnet describing the interface, which is freed by if_detach.

To correct this problem, a new call, bpfdetach, is introduced.  bpfdetach
locates BPF descriptor references to the interface, and NULLs them.  Other
BPF code is modified so that discovery of a NULL interface results in
ENXIO (already implemented for some calls).  Processes blocked on a BPF
call will also be woken up so that they can receive ENXIO.

Interface drivers that invoke bpfattach and if_detach must be modified to
also call bpfattach(ifp) before calling if_detach(ifp).  This is relevant
for buses that support hot removal, such as pccard and usb.  Patches to
all effected devices will not be committed, only to if_wi.c, due to
testing limitations.  To reproduce the crash, load up tcpdump on you
favorite pccard ethernet card, and then eject the card.  As some pccard
drivers do not invoke if_detach(ifp), this bug will not manifest itself
for those drivers.

Reviewed by:	wes
2000-03-19 05:42:34 +00:00
..
alpha - Add Support for the following PS/2 mice: 2000-03-18 15:21:40 +00:00
amd64 Please welcome the URio driver. Written by 2000-03-16 09:16:14 +00:00
boot Sync with sys/boot/i386/libi386/biosdisk.c revision 1.27 and 1.28. 2000-03-17 12:38:36 +00:00
cam o clear the ccb_flags field before sending an accept target I/O ccb to 2000-03-18 22:13:27 +00:00
coda Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
compat Fix some style bugs. The long line is in a chunk of code that's 2000-03-13 15:27:19 +00:00
compile
conf Put ASUSCOM_IPAC in the section where it belongs, namely i4b. 2000-03-18 19:30:58 +00:00
contrib o Replace the old "oltr" driver with the completely re-written 2000-03-18 23:51:54 +00:00
crypto Prototype fix for IPsec authentication related functions 2000-02-10 19:35:53 +00:00
ddb Add a new sysctl "debug.enter_debugger" (when the kernel is compiled 2000-01-27 22:27:34 +00:00
dev Missing pieces of the last commit ;-( 2000-03-19 04:37:18 +00:00
fs Eliminate the undocumented, experimental, non-delivering and highly 2000-03-16 08:51:55 +00:00
geom Remove #if NCCD > 0 - it's guaranteed to be true by config if ccd.c is 2000-01-29 14:29:56 +00:00
gnu Bug fixes for currently harmless bugs that could rise to bite 2000-03-15 07:18:15 +00:00
i4b Fix a problem which caused i/o resource allocation conflict of this 2000-03-09 20:57:47 +00:00
i386 - Properly keep track of I/O port resources. 2000-03-19 03:25:13 +00:00
isa Missing pieces of the last commit ;-( 2000-03-19 04:37:18 +00:00
isofs/cd9660 remove check now done in vn_isdisk(). 2000-01-10 12:24:36 +00:00
kern Make sure to free the socket in soabort() if the protocol couldn't 2000-03-18 08:56:56 +00:00
libkern Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
miscfs Eliminate the undocumented, experimental, non-delivering and highly 2000-03-16 08:51:55 +00:00
modules Please welcome the URio driver. Written by 2000-03-16 09:16:14 +00:00
msdosfs Supported non-512 bytes/sector format. 2000-01-27 14:43:07 +00:00
net The advent of if_detach, allowing interface removal at runtime, makes it 2000-03-19 05:42:34 +00:00
netatalk Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
netatm Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
netgraph Newer ciscos have become more picky, and will not accept the MULTICAST bit 2000-03-17 17:06:33 +00:00
netinet Fix reporting of src and dst IP addresses for ICMP and generic IP packets. 2000-03-14 14:11:53 +00:00
netinet6 Backout the previous change to __KAME_VERSION (FreeBSD4.x addition), 2000-03-13 10:07:30 +00:00
netipx Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
netkey comment the string after #endif 2000-01-15 05:15:06 +00:00
netnatm Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
netncp Enable '=' character in the filename. 2000-01-29 02:10:37 +00:00
netns Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
nfs Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
nfsclient Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
nfsserver Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
ntfs Forward declare some structs so that this header is more self-suifficent. 2000-01-14 19:54:42 +00:00
nwfs Check if module was compiled without SMP support and running on 2000-01-15 08:35:48 +00:00
pc98 Fixed header file path and added necessary file. 2000-03-17 12:56:23 +00:00
pccard Add support for PnP ISA cards, and some laptop PnP support: 2000-03-10 05:43:29 +00:00
pci Print the PCI resources even if they are disabled. This shows more clearly 2000-03-18 19:18:36 +00:00
posix4 Track libc_r addition of semaphores implementation. 2000-01-20 07:55:42 +00:00
powerpc Update the ata driver to take more advantage of newbus, this 2000-02-18 20:57:33 +00:00
rpc $Id$ -> $FreeBSD$ 1999-08-27 23:45:13 +00:00
svr4 Fix handling of svr4_sigsets, which are implemented in SysVR4 as a sequence 2000-01-15 15:38:17 +00:00
sys Use __alias__ instead of alias in the definition of __strong_reference(). 2000-03-18 22:26:54 +00:00
tools Use a seperate -c and -h mode. The vnode_if.c file is compiled only into 1999-12-12 16:43:05 +00:00
ufs Use 64-bit math to calculate if we have hit our freespace limit. 2000-03-17 03:44:47 +00:00
vm Eliminate the undocumented, experimental, non-delivering and highly 2000-03-16 08:51:55 +00:00
Makefile ${MACHINE} -> ${MACHINE_ARCH} 1999-11-14 13:54:44 +00:00