svn commit: r337328 - in head/sys: kern sys

Mark Johnston markj at freebsd.org
Sun Aug 5 03:07:44 UTC 2018


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


More information about the svn-src-head mailing list