svn commit: r262867 - in head: sys/kern sys/sys tests/sys/kern

Gleb Smirnoff glebius at FreeBSD.org
Fri Mar 7 23:01:25 UTC 2014


  Alan,

On Thu, Mar 06, 2014 at 08:24:15PM +0000, Alan Somers wrote:
A> Author: asomers
A> Date: Thu Mar  6 20:24:15 2014
A> New Revision: 262867
A> URL: http://svnweb.freebsd.org/changeset/base/262867
A> 
A> Log:
A>   Fix PR kern/185813 "SOCK_SEQPACKET AF_UNIX sockets with asymmetrical
A>   buffers drop packets".  It was caused by a check for the space available
A>   in a sockbuf, but it was checking the wrong sockbuf.
A>   
A>   sys/sys/sockbuf.h
A>   sys/kern/uipc_sockbuf.c
A>       Add sbappendaddr_nospacecheck_locked(), which is just like
A>       sbappendaddr_locked but doesn't validate the receiving socket's
A>       space.  Factor out common code into sbappendaddr_locked_internal().
A>       We shouldn't simply make sbappendaddr_locked check the space and
A>       then call sbappendaddr_nospacecheck_locked, because that would cause
A>       the O(n) function m_length to be called twice.
A>   
A>   sys/kern/uipc_usrreq.c
A>       Use sbappendaddr_nospacecheck_locked for SOCK_SEQPACKET sockets,
A>       because the receiving sockbuf's size limit is irrelevant.
A>   
A>   tests/sys/kern/unix_seqpacket_test.c
A>       Now that 185813 is fixed, pipe_128k_8k fails intermittently due to
A>       185812.  Make it fail every time by adding a usleep after starting
A>       the writer thread and before starting the reader thread in
A>       test_pipe.  That gives the writer time to fill up its send buffer.
A>       Also, clear the expected failure message due to 185813.  It actually
A>       said "185812", but that was a typo.

Can you please look at 181741? Seems very much related.

-- 
Totus tuus, Glebius.


More information about the svn-src-head mailing list