From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH 3/3] make sock_alloc_file() do sock_release() on failures Date: Tue, 05 Dec 2017 18:41:02 -0500 (EST) Message-ID: <20171205.184102.1062890615816527656.davem@davemloft.net> References: <20171205232909.GY21978@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: viro@ZenIV.linux.org.uk Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:42408 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753013AbdLEXlD (ORCPT ); Tue, 5 Dec 2017 18:41:03 -0500 In-Reply-To: <20171205232909.GY21978@ZenIV.linux.org.uk> Sender: netdev-owner@vger.kernel.org List-ID: From: Al Viro Date: Tue, 5 Dec 2017 23:29:09 +0000 > This changes calling conventions (and simplifies the hell out > the callers). New rules: once struct socket had been passed > to sock_alloc_file(), it's been consumed either by struct file > or by sock_release() done by sock_alloc_file(). Either way > the caller should not do sock_release() after that point. > > Reviewed-by: Eric Dumazet > Signed-off-by: Al Viro Applied.