freebsd-skq/sys
rwatson c9ef486fe1 Modify most routines returning 'struct ifaddr *' to return references
rather than pointers, requiring callers to properly dispose of those
references.  The following routines now return references:

  ifaddr_byindex
  ifa_ifwithaddr
  ifa_ifwithbroadaddr
  ifa_ifwithdstaddr
  ifa_ifwithnet
  ifaof_ifpforaddr
  ifa_ifwithroute
  ifa_ifwithroute_fib
  rt_getifa
  rt_getifa_fib
  IFP_TO_IA
  ip_rtaddr
  in6_ifawithifp
  in6ifa_ifpforlinklocal
  in6ifa_ifpwithaddr
  in6_ifadd
  carp_iamatch6
  ip6_getdstifaddr

Remove unused macro which didn't have required referencing:

  IFP_TO_IA6

This closes many small races in which changes to interface
or address lists while an ifaddr was in use could lead to use of freed
memory (etc).  In a few cases, add missing if_addr_list locking
required to safely acquire references.

Because of a lack of deep copying support, we accept a race in which
an in6_ifaddr pointed to by mbuf tags and extracted with
ip6_getdstifaddr() doesn't hold a reference while in transmit.  Once
we have mbuf tag deep copy support, this can be fixed.

Reviewed by:	bz
Obtained from:	Apple, Inc. (portions)
MFC after:	6 weeks (portions)
2009-06-23 20:19:09 +00:00
..
amd64 Eliminate dead code. These definitions should have been deleted with the 2009-06-22 04:21:02 +00:00
arm Now that we have UARTs running with fast interrupt handlers the ata 2009-06-23 19:29:23 +00:00
boot Bump PowerPC loader(8) version to reflect extensions it has recently grown. 2009-06-22 15:57:12 +00:00
bsm Merge OpenBSM 1.1 from OpenBSM vendor branch to head. 2009-04-19 16:17:13 +00:00
cam Change cam_periph_ioctl() to take 'cmd' and a u_long instead of an 2009-06-22 14:43:48 +00:00
cddl O_NOFOLLOW shall be in flags, not in cmode. 2009-06-22 10:08:48 +00:00
compat After cleaning up rt_tables from vnet.h and cleaning up opt_route.h 2009-06-23 17:03:45 +00:00
conf Implement minimal set of changes suggested by bz to make 2009-06-23 17:42:06 +00:00
contrib Modify most routines returning 'struct ifaddr *' to return references 2009-06-23 20:19:09 +00:00
crypto Changed to M_NOWAIT when reallocing psc_buf in padlock_sha_update(), 2009-05-27 09:52:12 +00:00
ddb Place hostnames and similar information fully under the prison system. 2009-05-29 21:27:12 +00:00
dev Add some sysctl info so that we can see what is going on with vblanks. 2009-06-23 20:19:02 +00:00
fs Add explicit struct ucred * argument for VOP_VPTOCNP, to be used by 2009-06-21 19:21:01 +00:00
gdb
geom Fix tabs, slightly improve comments. 2009-06-18 11:12:11 +00:00
gnu Do not use casts (int *)0 and (struct thread *)0 for the arguments of 2009-06-16 15:13:45 +00:00
i386 * Driver for ACPI WMI (Windows Management Instrumentation) 2009-06-23 13:17:25 +00:00
ia64 Drop the high FP state of an exiting thread in cpu_thread_exit() and 2009-06-20 05:36:53 +00:00
isa Rename statclock_disable variable to atrtcclock_disable that it actually is, 2009-05-03 17:47:21 +00:00
kern After cleaning up rt_tables from vnet.h and cleaning up opt_route.h 2009-06-23 17:03:45 +00:00
kgssapi When the KOBJMETHOD() macro was updated, it resulted in the 2009-06-14 17:33:46 +00:00
libkern done method is supposed to return int. 2009-06-22 22:09:18 +00:00
mips Add a .cvsignore file and along with that put an svn:ignore proprty 2009-06-17 10:48:32 +00:00
modules Implement minimal set of changes suggested by bz to make 2009-06-23 17:42:06 +00:00
net Modify most routines returning 'struct ifaddr *' to return references 2009-06-23 20:19:09 +00:00
net80211 Modify most routines returning 'struct ifaddr *' to return references 2009-06-23 20:19:09 +00:00
netatalk Add a global rwlock, at_ifaddr_rw, to protect the global netatalk 2009-06-22 10:23:54 +00:00
netgraph After cleaning up rt_tables from vnet.h and cleaning up opt_route.h 2009-06-23 17:03:45 +00:00
netinet Modify most routines returning 'struct ifaddr *' to return references 2009-06-23 20:19:09 +00:00
netinet6 Modify most routines returning 'struct ifaddr *' to return references 2009-06-23 20:19:09 +00:00
netipsec Move setting of ports from NAT-T below key_getsah() and actually 2009-06-19 21:01:55 +00:00
netipx Modify most routines returning 'struct ifaddr *' to return references 2009-06-23 20:19:09 +00:00
netnatm Reimplement the netisr framework in order to support parallel netisr 2009-06-01 10:41:38 +00:00
netncp
netsmb Rework socket upcalls to close some races with setup/teardown of upcalls. 2009-06-01 21:17:03 +00:00
nfs Add cpu_flush_dcache() for use after non-DMA based I/O so that a 2009-05-18 18:37:18 +00:00
nfsclient After cleaning up rt_tables from vnet.h and cleaning up opt_route.h 2009-06-23 17:03:45 +00:00
nfsserver Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
nlm Since svc_[dg|vc|tli|tp]_create() did not hold a reference count on the 2009-06-17 22:50:26 +00:00
opencrypto Fix cryptodev UIO creation. 2009-05-23 13:23:46 +00:00
pc98 Remove MAC kernel config files and add "options MAC" to GENERIC, with the 2009-06-02 18:31:08 +00:00
pci When user_frac in the polling subsystem is low it is going to busy the 2009-05-30 15:14:44 +00:00
powerpc Add cpufreq support on the PowerPC G5, along with a skeleton SMU driver 2009-06-23 04:28:32 +00:00
rpc Delete the declaration of an unused variable so that it will build. 2009-06-20 17:16:29 +00:00
security Chase the removal of PRIV_TTY_PRISON in the mac(9) modules. 2009-06-20 15:54:35 +00:00
sparc64 Add cas(4), a driver for Sun Cassini/Cassini+ and National Semiconductor 2009-06-15 18:22:41 +00:00
sun4v Adjust the padding of struct pcpu to r193219. 2009-06-03 19:31:26 +00:00
sys - Add a new cpuset macro, CPU_FILL(), for setting the set to all 1s. 2009-06-23 06:57:46 +00:00
tools - Add a way to change filter oversampling factor through 2009-06-15 04:31:34 +00:00
ufs Rework the credential code to support larger values of NGROUPS and 2009-06-19 17:10:35 +00:00
vm Validate the page in one place, dev_pager_getpages(), rather than doing it 2009-06-22 19:09:48 +00:00
xdr MFdevbranch 192944 2009-05-28 08:18:12 +00:00
xen Make ipi_cpu() function as intended. 2009-05-30 08:53:13 +00:00
Makefile Remove the unmaintained University of Michigan NFSv4 client from 8.x 2009-05-22 12:35:12 +00:00