freebsd-nq/sys
Conrad Meyer 0c40f3532d Fix cleanup race between unp_dispose and unp_gc
unp_dispose and unp_gc could race to teardown the same mbuf chains, which
can lead to dereferencing freed filedesc pointers.

This patch adds an IGNORE_RIGHTS flag on unpcbs marking the unpcb's RIGHTS
as invalid/freed. The flag is protected by UNP_LIST_LOCK.

To serialize against unp_gc, unp_dispose needs the socket object. Change the
dom_dispose() KPI to take a socket object instead of an mbuf chain directly.

PR:		194264
Differential Revision:	https://reviews.freebsd.org/D3044
Reviewed by:	mjg (earlier version)
Approved by:	markj (mentor)
Obtained from:	mjg
MFC after:	1 month
Sponsored by:	EMC / Isilon Storage Division
2015-07-14 02:00:50 +00:00
..
amd64 Now that aesni won't reuse fpu contexts (D3016), add seatbelts to the 2015-07-08 19:26:36 +00:00
arm Bring a few simplifications to a10_gpio: 2015-07-13 18:19:26 +00:00
arm64 Add ARM64TODO comments to ACPI PCI stubs 2015-07-12 18:32:16 +00:00
boot Add the Banana Pi DTS. 2015-07-07 19:01:54 +00:00
bsm
cam Create a dedicated function for ensuring that cdir and rdir are populated. 2015-07-11 16:22:48 +00:00
cddl Create a dedicated function for ensuring that cdir and rdir are populated. 2015-07-11 16:22:48 +00:00
compat Implement normal and abnormal process termination. 2015-07-11 19:41:31 +00:00
conf * Address review (and add a bit myself). 2015-07-12 18:14:38 +00:00
contrib Import the CloudABI datatypes and create a system call table. 2015-07-09 07:20:15 +00:00
crypto Complete the move that was started w/ r263218.. For some reason I 2015-07-11 03:12:34 +00:00
ddb Correct the function name in catch-all error handling case. 2015-06-17 10:20:59 +00:00
dev Switch initiator IDs in target mode to the same address space as target 2015-07-13 21:01:24 +00:00
fs Check suspendability on the mountpoint returned by VOP_GETWRITEMOUNT. 2015-07-05 22:37:33 +00:00
gdb CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
geom Spoil even can happen for some time now even on providers opened exclusively 2015-07-10 19:27:19 +00:00
gnu The GNU Amlogic DTS files have some errors (e.g. bad register 2015-04-11 08:17:39 +00:00
i386 Convert between abridged (from FXSAVE) and unabridged (from FSAVE) 2015-07-10 09:20:13 +00:00
isa
kern Fix cleanup race between unp_dispose and unp_gc 2015-07-14 02:00:50 +00:00
kgssapi
libkern Remove checks for __ARM_EABI__, we only build for EABI now. 2015-07-09 21:02:40 +00:00
mips Add the atomic_thread_fence() family of functions with intent to 2015-07-08 18:12:24 +00:00
modules Rename zfs nvpair files to not colidate with our nvlist. 2015-07-09 21:53:40 +00:00
net * Address review (and add a bit myself). 2015-07-12 18:14:38 +00:00
net80211 Break out the current 802.11 software scan methods into an indirect table. 2015-06-08 02:35:43 +00:00
netgraph * Address review (and add a bit myself). 2015-07-12 18:14:38 +00:00
netinet Correct issue presented in r285051, 2015-07-09 16:28:36 +00:00
netinet6 Keep IPv6 address specified by IPV6_PKTINFO socket option in kernel 2015-07-03 19:01:38 +00:00
netipsec Summary: Fix LINT build. The names of the new AES modes were not 2015-07-10 02:23:50 +00:00
netnatm
netpfil assorted algorithmic fixes from Paolo Valente (one of my qfq coauthors): 2015-07-10 19:24:36 +00:00
netsmb
nfs Avoid closing unallocated socket in case socreate fails. 2015-02-28 20:30:29 +00:00
nfsclient Remove some oldnfs remnants. 2015-04-18 16:08:06 +00:00
nfsserver
nlm
ofed Fix broken implementation of "kvasprintf()" function by adding missing 2015-07-03 11:16:20 +00:00
opencrypto Add support for AES modes to IPSec. These modes work both in software only 2015-07-09 18:16:35 +00:00
pc98 Fix up tabs vs. spaces 2015-07-04 20:31:06 +00:00
powerpc cpu_number and cpu_swapout are never used, and only defined in powerpc. 2015-07-11 17:33:50 +00:00
rpc Remove hard limits on number of accepting NFS connections. 2015-04-07 10:25:27 +00:00
security fd: make 'rights' a manadatory argument to fget* functions 2015-07-05 19:05:16 +00:00
sparc64 Add the atomic_thread_fence() family of functions with intent to 2015-07-08 18:12:24 +00:00
sys Fix cleanup race between unp_dispose and unp_gc 2015-07-14 02:00:50 +00:00
teken
tools
ufs Move chdir/chroot-related fdp manipulation to kern_descrip.c 2015-07-11 16:19:11 +00:00
vm Add an initial NUMA affinity/policy configuration for threads and processes. 2015-07-11 15:21:37 +00:00
x86 Set the initial system time to a sane (as in: not end of 21st century) value when 2015-06-29 17:02:09 +00:00
xdr
xen Garbage collect comments which related to the pre-r284296 support for a 2015-06-21 06:05:33 +00:00
Makefile Kill EoL whitespace. 2015-05-29 14:03:07 +00:00