Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 2014 16:08:51 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Alan Somers <asomers@freebsd.org>
Subject:   Re: svn commit: r262867 - in head: sys/kern sys/sys tests/sys/kern
Message-ID:  <CAOtMX2gM04_3BVzE19we1xDm2SD%2BvEfsxwMyArJGDDbFHQZweg@mail.gmail.com>
In-Reply-To: <20140307225800.GG80022@FreeBSD.org>
References:  <201403062024.s26KOFcI085288@svn.freebsd.org> <20140307225800.GG80022@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 7, 2014 at 3:58 PM, Gleb Smirnoff <glebius@freebsd.org> wrote:
>   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.

Yes, it's related.  The difference is that 181741 deals with
sbappendcontrol_locked, but 185813 deals with sbappendaddr_locked.
Similar functions that both had the same problem.  Also, see my
comments in the bug tracker for 181741.

-alan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2gM04_3BVzE19we1xDm2SD%2BvEfsxwMyArJGDDbFHQZweg>