From owner-svn-src-all@FreeBSD.ORG Mon Feb 23 18:42:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 207C9A81; Mon, 23 Feb 2015 18:42:47 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CA2BC63; Mon, 23 Feb 2015 18:42:45 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t1NIghRF010793 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 23 Feb 2015 21:42:43 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t1NIgh3T010792; Mon, 23 Feb 2015 21:42:43 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 23 Feb 2015 21:42:43 +0300 From: Gleb Smirnoff To: "Andrey V. Elsukov" Subject: Re: svn commit: r279206 - head/sys/kern Message-ID: <20150223184243.GF15484@FreeBSD.org> References: <201502231341.t1NDfaPh029088@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201502231341.t1NDfaPh029088@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Mon, 23 Feb 2015 18:42:47 -0000 On Mon, Feb 23, 2015 at 01:41:36PM +0000, Andrey V. Elsukov wrote: A> Author: ae A> Date: Mon Feb 23 13:41:35 2015 A> New Revision: 279206 A> URL: https://svnweb.freebsd.org/changeset/base/279206 A> A> Log: A> In some cases soreceive_dgram() can return no data, but has control A> message. This can happen when application is sending packets too big A> for the path MTU and recvmsg() will return zero (indicating no data) A> but there will be a cmsghdr with cmsg_type set to IPV6_PATHMTU. A> Remove KASSERT() which does NULL pointer dereference in such case. A> Also call m_freem() only when m isn't NULL. A> A> PR: 197882 A> MFC after: 1 week A> Sponsored by: Yandex LLC All this code is so entangled, due to historical decision to have code to handle dgram and stream sockets, data messages and control messages. Now that dgram and stream are almost[1] split, splitting data and control would finish un-entangling. This would require introducing extra pr_ methods, not a big deal. [1] Struct sockbuf is still the same. -- Totus tuus, Glebius.