Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Aug 2018 23:07:36 -0400
From:      Mark Johnston <markj@freebsd.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r337328 - in head/sys: kern sys
Message-ID:  <20180805030736.GA20016@raichu>
In-Reply-To: <201808042026.w74KQt6V006467@repo.freebsd.org>
References:  <201808042026.w74KQt6V006467@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 04, 2018 at 08:26:55PM +0000, Mark Johnston wrote:
> Author: markj
> Date: Sat Aug  4 20:26:54 2018
> New Revision: 337328
> URL: https://svnweb.freebsd.org/changeset/base/337328
> 
> Log:
>   Don't check rcv sockbuf limits when sending on a unix stream socket.
>   
>   sosend_generic() performs an initial comparison of the amount of data
>   (including control messages) to be transmitted with the send buffer
>   size. When transmitting on a unix socket, we then compare the amount
>   of data being sent with the amount of space in the receive buffer size;
>   if insufficient space is available, sbappendcontrol() returns an error
>   and the data is lost.  This is easily triggered by sending control
>   messages together with an amount of data roughly equal to the send
>   buffer size, since the control message size may change in uipc_send()
>   as file descriptors are internalized.
>   
>   Fix the problem by removing the space check in sbappendcontrol(),
>   whose only consumer is the unix sockets code.  The stream sockets code
>   uses the SB_STOP mechanism to ensure that senders will block if the
>   receive buffer fills up.
>   
>   PR:		181741
>   MFC after:	1 month
>   Sponsored by:	The FreeBSD Foundation
>   Differential Revision:	https://reviews.freebsd.org/D16515

Sorry, I forgot:

Tested by:	jbeich, pho



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180805030736.GA20016>