From owner-svn-src-all@freebsd.org Sun Aug 5 03:07:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7387C106072A; Sun, 5 Aug 2018 03:07:44 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2911764E0; Sun, 5 Aug 2018 03:07:43 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf1-x42d.google.com with SMTP id y10-v6so5174429pfn.8; Sat, 04 Aug 2018 20:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QMYu2QjsH/Nr7T3jkdX4Iv6e/VJnz2rtT8obP21KwzE=; b=eooKi8qTccFNMX792D/YXHaKKl0h209P+J70h2PeJt9pAV4G6X30bY5S3AyyazY2mu AVL4ALMV5v2RQj/uoDdWoNzPWnU9cnTWh9G2RXd0KaLZHE9rYfGfnhPdVsp8FU/Y48HL anCjU716frCXbqqTQsqEgQhrgc4Io5q8TNVv2af7x08dk/zSp53giKCPcs6spEj5AbpC cRuwIZ1vi8/QTlr36pQwLlphMmlJQBKJ7F3k9Tpz+0RbxqvIQfJplwWfEDWUufGGIAnB xxs1iMyfqkmLmvp2/O8Gq3eL8jBSOWvZPpW7TWnIbqoUhHuZs0/7Cuqk14mje8uCcIno VK5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=QMYu2QjsH/Nr7T3jkdX4Iv6e/VJnz2rtT8obP21KwzE=; b=PJdClcHOGjRPtUCeLnI33qlESP8wB9hAv0h6ZUq+LDLOlLjIo2vXF0/TBi2KwzF0uV O174iKbqsMhiAx8EKV17qgQtiq/UtLAbI9EdiWwC0QIrfer0Rq8tvfWhZokeJQ0TfGjw aFvNabxoxM9L1Rcj3lhdBlxXy0H8SOp72eR/0uGk9sWZ6T8QksdzwCvL35bAkcJOopGk FHhfEunuWjSeBW/TkSLnl9wU3W3VS4LMwZ5xGBm9Z2FNW7oo6PWxQwAMUnM646kaxDLY dKcTXwbceyXZteAFvHcAVallNtXUCdul/MCYyYsN9uSgg37H5Mw8N4iFxvbP0kHNItv+ JaLA== X-Gm-Message-State: AOUpUlEPVcFUOh63IMCjZ1p53Bfl1CLvLvatRa8FQCtuVSoKvL4pxou8 jD4rYvyT+yUQkH3VRQKJvQC5PZEW X-Google-Smtp-Source: AAOMgpfU5KghA/DI+Ih1Rem7xouOIGyIMBhSx8BjfTt6uLEZPx6QsLI+n+G7eSSSEry8YEKqkD8X+A== X-Received: by 2002:a65:6551:: with SMTP id a17-v6mr9589204pgw.132.1533438462665; Sat, 04 Aug 2018 20:07:42 -0700 (PDT) Received: from raichu (toroon0560w-lp130-09-70-52-224-239.dsl.bell.ca. [70.52.224.239]) by smtp.gmail.com with ESMTPSA id g5-v6sm5262390pfc.77.2018.08.04.20.07.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Aug 2018 20:07:41 -0700 (PDT) Sender: Mark Johnston Date: Sat, 4 Aug 2018 23:07:36 -0400 From: Mark Johnston 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> References: <201808042026.w74KQt6V006467@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201808042026.w74KQt6V006467@repo.freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2018 03:07:44 -0000 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