freebsd-dev/sys
Alan Somers 8de34a88de Fix PR kern/185813 "SOCK_SEQPACKET AF_UNIX sockets with asymmetrical
buffers drop packets".  It was caused by a check for the space available
in a sockbuf, but it was checking the wrong sockbuf.

sys/sys/sockbuf.h
sys/kern/uipc_sockbuf.c
    Add sbappendaddr_nospacecheck_locked(), which is just like
    sbappendaddr_locked but doesn't validate the receiving socket's
    space.  Factor out common code into sbappendaddr_locked_internal().
    We shouldn't simply make sbappendaddr_locked check the space and
    then call sbappendaddr_nospacecheck_locked, because that would cause
    the O(n) function m_length to be called twice.

sys/kern/uipc_usrreq.c
    Use sbappendaddr_nospacecheck_locked for SOCK_SEQPACKET sockets,
    because the receiving sockbuf's size limit is irrelevant.

tests/sys/kern/unix_seqpacket_test.c
    Now that 185813 is fixed, pipe_128k_8k fails intermittently due to
    185812.  Make it fail every time by adding a usleep after starting
    the writer thread and before starting the reader thread in
    test_pipe.  That gives the writer time to fill up its send buffer.
    Also, clear the expected failure message due to 185813.  It actually
    said "185812", but that was a typo.

PR:		kern/185813
Reviewed by:	silence from freebsd-net@ and rwatson@
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corporation
2014-03-06 20:24:15 +00:00
..
amd64 Disable amd64 TLB Context ID (pcid) by default for now 2014-03-05 01:34:10 +00:00
arm Use the standard __used macro instead of a bare __attribute__. 2014-03-03 14:37:18 +00:00
boot Use an empty ranges statement for the bus, because all the children on the 2014-03-04 14:19:15 +00:00
bsm Change the cap_rights_t type from uint64_t to a structure that we can extend 2013-09-05 00:09:56 +00:00
cam Make reset handling in iSCSI target RFC-compliant. This fixes some rare 2014-03-06 10:45:53 +00:00
cddl All callers of static method load_nvlist() in spa.c handles error case, 2014-03-02 02:41:33 +00:00
compat linprocfs: add support for /sys/kernel/random/uuid 2014-02-27 00:43:10 +00:00
conf Use a full path to the target for make rules which create symlinks @, 2014-03-04 14:00:49 +00:00
contrib MFV r262756: 2014-03-05 01:33:15 +00:00
crypto fix broken style(9) in r258399 2013-11-23 00:28:18 +00:00
ddb
dev Minor fix to r262789. 2014-03-06 12:37:25 +00:00
fs ext2fs: small formatting fixes. 2014-03-01 21:22:20 +00:00
gdb
geom In g_eli_crypto_hmac_init(), zero out after using the ipad buffer, 2014-02-08 05:17:49 +00:00
gnu Symbolic bindings for the dts files... 2014-02-28 16:51:33 +00:00
i386 When the kernel is running in a virtual machine, it cannot rely upon the 2014-02-22 18:53:42 +00:00
ia64 When reading physical memory, make sure to access it using the right 2014-03-04 03:19:36 +00:00
isa
kern Fix PR kern/185813 "SOCK_SEQPACKET AF_UNIX sockets with asymmetrical 2014-03-06 20:24:15 +00:00
kgssapi
libkern Fix typo 2013-11-29 20:14:26 +00:00
mips Populate the GPIO pins and GPIOLED configs 2014-03-05 04:22:07 +00:00
modules Use SYSDIR to reference to the top of the sys hierarchy. Define SYSDIR 2014-03-06 01:59:13 +00:00
net The route code used to mtx_destroy() a locked mutex before rtentry free. Now, 2014-03-05 21:16:46 +00:00
net80211 Another round of removing historical mbuf(9) allocator flags. 2014-01-16 13:44:47 +00:00
netatalk Fix build. 2014-03-05 02:35:41 +00:00
netgraph Be much more specific (and correct) about the device id matching. 2014-01-09 15:31:44 +00:00
netinet - Remove rt_metrics_lite and simply put its members into rtentry. 2014-03-05 01:17:47 +00:00
netinet6 - Remove rt_metrics_lite and simply put its members into rtentry. 2014-03-05 01:17:47 +00:00
netipsec Remove more constants related to static sysctl nodes. The MAXID constants 2014-02-25 18:44:33 +00:00
netipx - Remove rt_metrics_lite and simply put its members into rtentry. 2014-03-05 01:17:47 +00:00
netnatm Provide includes that are needed in these files, and before were read 2013-10-26 18:18:50 +00:00
netpfil - Remove rt_metrics_lite and simply put its members into rtentry. 2014-03-05 01:17:47 +00:00
netsmb Catch up with sb_timeo type change in r255138. This fixes 2013-11-08 08:44:09 +00:00
nfs - Remove rt_metrics_lite and simply put its members into rtentry. 2014-03-05 01:17:47 +00:00
nfsclient For software builds, the NFS client does many small 2013-12-07 23:05:59 +00:00
nfsserver Fix RPC server threads file handle affinity to work better with ZFS. 2013-12-23 08:43:16 +00:00
nlm Intermittent crashes in the NLM (rpc.lockd) code during system 2013-09-06 23:14:31 +00:00
ofed Simplify filling sockaddr_dl structure for if_resolvemulti() 2014-01-18 23:24:51 +00:00
opencrypto Prevent races in accesses of the software crypto session array. 2014-01-28 22:02:29 +00:00
pc98 Don't waste a page of KVA for the boot-time memory test on x86. For amd64, 2014-02-11 22:02:40 +00:00
pci - Implement the RX EARLYOFF and RXDV GATED bits as done by RealTek's Linux 2014-02-05 23:13:40 +00:00
powerpc Correct the order of arguments to mtx_init(). 2014-02-14 11:18:15 +00:00
rpc Fix lock acquisition in case no request space available, missed in r260097. 2014-02-04 00:00:01 +00:00
security As constantly reported during kernel compilation, m_buflen is unsigned so 2013-12-25 20:10:17 +00:00
sparc64 Merge from head up to r262472. 2014-02-25 07:40:37 +00:00
sys Fix PR kern/185813 "SOCK_SEQPACKET AF_UNIX sockets with asymmetrical 2014-03-06 20:24:15 +00:00
teken Fix typo. 2014-02-06 13:28:06 +00:00
tools Use proper include path for dtc as well as cpp. 2014-02-28 22:37:35 +00:00
ufs - If we fail to do a non-blocking acquire of a buf lock while doing a 2014-03-06 00:13:21 +00:00
vm After r251709, avoid a clang 3.4 warning about an unused static const 2014-02-14 17:47:18 +00:00
x86 Move fpusave() wrapper for suspend hander to sys/amd64/amd64/fpu.c. 2014-03-04 21:35:57 +00:00
xdr
xen Remove redundant redeclaration of gdtset in sys/xen/xen-os.h, to silence 2013-10-18 17:06:13 +00:00
Makefile Add netpfil to CSCOPEDIRS. 2013-12-30 08:36:17 +00:00