1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-11 14:10:34 +00:00
freebsd/sys
Robert Watson 109058b094 tcp_usrreq.c:1.313 removed tcbinfo locking from tcp_usr_accept(), which
while in principle a good idea, opened us up to a race inherrent to
the syncache's direct insertion of incoming TCP connections into the
"completed connection" listen queue, as it transpires that the socket
is inserted before the inpcb is fully filled in by syncache_expand().
The bug manifested with the occasional returning of 0.0.0.0:0 in the
address returned by the accept() system call, which occurred if accept
managed to execute tcp_usr_accept() before syncache_expand() had copied
the endpoint addresses into inpcb connection state.

Re-add tcbinfo locking around the address copyout, which has the effect
of delaying the copy until syncache_expand() has finished running, as
it is run while the tcbinfo lock is held.  This is undesirable in that
it increases contention on tcbinfo further, but a more significant
change will be required to how the syncache inserts new sockets in
order to fix this and keep more granular locking here.  In particular,
either more state needs to be passed into sonewconn() so that
pru_attach() can fill in the fields *before* the socket is inserted, or
the socket needs to be inserted in the incomplete connection queue
until it is actually ready to be used.

Reported by:	glebius (and kris)
Tested by:	glebius
2008-01-23 21:15:51 +00:00
..
amd64 Use cpu_spinwait() (i.e., "pause") when spinning on rdtsc during DELAY(). 2008-01-17 18:59:38 +00:00
arm - Retire npe_defrag(), gem_defrag(), msk_defrag(), nfe_defrag(), and 2008-01-17 23:37:47 +00:00
boot Bump manpage date for rev 1.27 2008-01-16 07:00:55 +00:00
bsm Merge OpenBSM 1.0 changes to src/sys/bsm: 2007-10-29 18:47:25 +00:00
cam o Correct EasyMP3 EM732X usb 2.0 flash mp3 player revision: 2008-01-12 19:24:55 +00:00
cddl VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in 2008-01-13 14:44:15 +00:00
compat Regenerate. 2008-01-20 23:44:24 +00:00
conf Update file list and Makefile after repocopying sf(4) from 2008-01-21 04:27:32 +00:00
contrib VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in 2008-01-13 14:44:15 +00:00
crypto Make test00 compilable again. 2008-01-15 18:34:47 +00:00
ddb Refine textdump comments slightly. 2008-01-10 00:26:47 +00:00
dev Take advantage of the new physically contiguous 9K jumbos in 8. 2008-01-22 22:04:31 +00:00
fs Put "coda_rdwr: Internally Opening" printf generated by in-kernel writes 2008-01-21 21:39:08 +00:00
gdb
geom Various fixes: 2007-12-24 01:01:59 +00:00
gnu - Introduce the function lockmgr_recursed() which returns true if the 2008-01-19 17:36:23 +00:00
i4b Spelling fix for interupt -> interrupt 2007-10-12 06:03:46 +00:00
i386 Use cpu_spinwait() (i.e., "pause") when spinning on rdtsc during DELAY(). 2008-01-17 18:59:38 +00:00
ia64 Add COMPAT_FREEBSD7 and enable it in configs that have COMPAT_FREEBSD6. 2008-01-07 21:40:11 +00:00
isa Use cpu_spinwait() (i.e., "pause") when spinning on rdtsc during DELAY(). 2008-01-17 18:59:38 +00:00
kern - sched_prio() should only adjust tdq_lowpri if the thread is running or on 2008-01-23 03:10:18 +00:00
libkern Do not use __XSCALE__ to detect if clz is available, use _ARM_ARCH_5 instead. 2007-10-13 12:05:36 +00:00
modules Update file list and Makefile after repocopying sf(4) from 2008-01-21 04:27:32 +00:00
net Remove a chunk of duplicated code, test the destination address against the 2008-01-18 09:34:09 +00:00
net80211 update channel flag defs to match _ieee80211.h so cpp doesn't complain 2007-12-13 01:23:40 +00:00
netatalk Annotate two possible bugs in a comment: (1) we allocate and explicitly 2007-11-20 18:50:54 +00:00
netatm Disconnect netatm from the build as it is not MPSAFE and relies on 2007-07-14 21:49:24 +00:00
netgraph Fix bundle xmit octets stats for packet-split operation mode. 2008-01-23 11:47:09 +00:00
netinet tcp_usrreq.c:1.313 removed tcbinfo locking from tcp_usr_accept(), which 2008-01-23 21:15:51 +00:00
netinet6 Correct the commented out debugging printf()s in REPLACE and NEXT macros. 2008-01-20 10:08:15 +00:00
netipsec Add sysctls to if_enc(4) to control whether the firewalls or 2007-11-28 22:33:53 +00:00
netipx Make tcpstates[] static, and make sure TCPSTATES is defined before 2007-07-30 11:06:42 +00:00
netnatm
netncp Refactor select to reduce contention and hide internal implementation 2007-12-16 06:21:20 +00:00
netsmb Refactor select to reduce contention and hide internal implementation 2007-12-16 06:21:20 +00:00
nfs
nfs4client - Introduce the function lockmgr_recursed() which returns true if the 2008-01-19 17:36:23 +00:00
nfsclient - Introduce the function lockmgr_recursed() which returns true if the 2008-01-19 17:36:23 +00:00
nfsserver Use nfsrv_destroycache() only once, else it crashes the server. 2008-01-18 17:03:36 +00:00
opencrypto Make ftruncate a 'struct file' operation rather than a vnode operation. 2008-01-07 20:05:19 +00:00
pc98 Add COMPAT_FREEBSD7 and enable it in configs that have COMPAT_FREEBSD6. 2008-01-07 21:40:11 +00:00
pccard
pci Add copyrights. 2008-01-21 13:26:33 +00:00
powerpc Add COMPAT_FREEBSD7 and enable it in configs that have COMPAT_FREEBSD6. 2008-01-07 21:40:11 +00:00
rpc Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, which 2007-08-06 14:26:03 +00:00
security Fix gratuitous whitespace bug 2008-01-18 19:57:21 +00:00
sparc64 Uncomment sf(4), sf(4) should work on all architectures. 2008-01-21 06:51:25 +00:00
sun4v Add an access type parameter to pmap_enter(). It will be used to implement 2008-01-03 07:34:34 +00:00
sys Bump FreeBSD_version after adding "ASCII" encoding to libc 2008-01-23 00:04:18 +00:00
tools
ufs - Introduce the function lockmgr_recursed() which returns true if the 2008-01-19 17:36:23 +00:00
vm VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in 2008-01-13 14:44:15 +00:00
Makefile o Add boot, gdb, nfsserver and opencrypto dirs to CSCOPEDIRS; sort. 2008-01-23 08:50:34 +00:00