freebsd-skq/sys
Lawrence Stewart 9a7e6bac47 Consumers of bpfdetach() expect it to remove all bpf_if structs from the
bpf_iflist list which reference the specified ifnet. The existing implementation
only removes the first matching bpf_if found in the list, effectively leaking
list entries if an ifnet has been bpfattach()ed multiple times with different
DLTs.

Fix the leak by performing the detach logic in a loop, stopping when all bpf_if
structs referencing the specified ifnet have been detached and removed from the
bpf_iflist list.

Whilst here, also:

- Remove the unnecessary "bp->bif_ifp == NULL" check, as a bpf_if should never
  exist in the list with a NULL ifnet pointer.

- Except when INVARIANTS is in the kernel config, silently ignore the case where
  no bpf_if referencing the specified ifnet is found, as it is harmless and does
  not require user attention.

Reviewed by:	csjp
MFC after:	1 week
2012-01-10 00:48:29 +00:00
..
amd64 Default to not performing the early-boot memory tests when we detect we 2011-12-31 13:24:53 +00:00
arm Add missing options so modules build/load correctly. 2012-01-05 20:18:01 +00:00
boot Get rid of a spurious warning on the console when booting the kernel 2012-01-09 20:25:14 +00:00
bsm
cam Add support for CDRIOCGETBLOCKSIZE and CDRIOCSETBLOCKSIZE IOCTLs to control 2012-01-03 17:04:09 +00:00
cddl - Allow to change vfs.zfs.arc_meta_limit at runtime. 2012-01-05 22:16:41 +00:00
compat In sys/compat/linux/linux_ioctl.c, work around a warning when a pointer 2012-01-03 18:49:39 +00:00
conf Enable hardware RNG for VIA Nano processors. 2012-01-09 23:20:30 +00:00
contrib Can't pass MSIZE to m_cljget(), an mbuf can't be attached as external storage 2012-01-09 14:35:05 +00:00
crypto Update Copyright. 2011-10-27 14:15:26 +00:00
ddb Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
dev Enable hardware RNG for VIA Nano processors. 2012-01-09 23:20:30 +00:00
fs Correct an error of omission in the implementation of the truncation 2012-01-08 20:09:26 +00:00
gdb kern cons: introduce infrastructure for console grabbing by kernel 2011-12-17 15:08:43 +00:00
geom Add support for >2TB disks in GEOM RAID for Intel metadata format. 2012-01-09 23:01:42 +00:00
gnu Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
i386 Fix the broken module build I introduced earlier. 2012-01-07 19:38:26 +00:00
ia64 Flip on IEEE80211_SUPPORT_MESH and AH_SUPPORT_AR5416, the 2012-01-05 17:28:05 +00:00
isa - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
kern Convert the per-interface address list lock from a mutex to a reader/writer 2012-01-09 19:34:12 +00:00
kgssapi Add missing break statement to make sure all 3DES etypes really are treated 2011-10-10 09:13:07 +00:00
libkern Implement extensions on top of standards instead of the other way around. 2012-01-03 07:05:30 +00:00
mips Fix relocations for MIPS64: 2012-01-08 05:44:19 +00:00
modules Enable hardware RNG for VIA Nano processors. 2012-01-09 23:20:30 +00:00
net Consumers of bpfdetach() expect it to remove all bpf_if structs from the 2012-01-10 00:48:29 +00:00
net80211 Correct comment for the IPv6 case to say "traffic class" not "TOS" 2012-01-07 23:41:38 +00:00
netatalk Convert all users of IF_ADDR_LOCK to use new locking macros that specify 2012-01-05 19:00:36 +00:00
netgraph Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
netinet Bunch of fixes to pfsync(4) module load/unload: 2012-01-09 08:50:22 +00:00
netinet6 Add an SCTP sysctl "blackhole", similar to the one for TCP. 2012-01-08 09:56:24 +00:00
netipsec Remove unused 'plen' variable. 2011-11-26 23:57:03 +00:00
netipx Convert all users of IF_ADDR_LOCK to use new locking macros that specify 2012-01-05 19:00:36 +00:00
netnatm
netncp Change ncp_scan_bindery_object() to pass a constant search string. 2011-10-16 08:44:03 +00:00
netsmb Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
nfs Some cleanup of BOOTP code. Initially I wanted to just change the ifioctl() 2011-12-13 07:02:48 +00:00
nfsclient jwd@ reported a problem via email where the old NFS client would 2011-12-21 02:45:51 +00:00
nfsserver Honor NFSv3 commit call (RFC 1813, Section 3.3.21) where when count is 0, 2011-12-15 02:26:53 +00:00
nlm Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
ofed Replace __signed by signed. 2011-12-13 13:38:03 +00:00
opencrypto Add the fo_chown and fo_chmod methods to struct fileops and use them 2011-08-16 20:07:47 +00:00
pc98 Flip these options on so the modules build correctly for now. 2012-01-06 08:51:20 +00:00
pci To save more power, switch to 10/100Mbps link when controller is 2011-11-23 23:29:18 +00:00
powerpc Fix build on powerpc64 too. The same as r229640. 2012-01-05 22:06:01 +00:00
rpc Both a crash reported on freebsd-current on Oct. 18 under the 2011-11-03 14:38:03 +00:00
security Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
sparc64 Add "options CAPABILITY_MODE" and "options CAPABILITIES" to GENERIC kernel 2011-12-29 22:48:36 +00:00
sys Add __generic(), to be able to use a very simple _Generic(). 2012-01-05 10:43:03 +00:00
teken Link the demo application against ncursesw to make Unicode work. 2011-10-13 14:20:27 +00:00
tools Restore the comment that I removed by accident. 2011-11-09 13:26:59 +00:00
ufs Avoid LOR between vfs_busy() lock and covered vnode lock on quotaon(). 2012-01-08 23:06:53 +00:00
vm Do not restart the scan in vm_object_page_clean() on the object 2012-01-04 16:04:20 +00:00
x86 Fix a few bugs in the SRAT parsing code: 2012-01-03 20:53:58 +00:00
xdr
xen s/timout/timeout 2011-12-15 06:29:13 +00:00
Makefile Improve the cscope target's handling of MD directories. Automatically 2012-01-03 17:31:27 +00:00