From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH 1/3] fix kcm_clone() Date: Tue, 05 Dec 2017 18:40:47 -0500 (EST) Message-ID: <20171205.184047.1804785495860576409.davem@davemloft.net> References: <20171205232757.GW21978@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]:42394 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752974AbdLEXkw (ORCPT ); Tue, 5 Dec 2017 18:40:52 -0500 In-Reply-To: <20171205232757.GW21978@ZenIV.linux.org.uk> Sender: netdev-owner@vger.kernel.org List-ID: From: Al Viro Date: Tue, 5 Dec 2017 23:27:57 +0000 > 1) it's fput() or sock_release(), not both > 2) don't do fd_install() until the last failure exit. > 3) not a bug per se, but... don't attach socket to struct file > until it's set up. > > Take reserving descriptor into the caller, move fd_install() to the > caller, sanitize failure exits and calling conventions. > > Cc: stable@vger.kernel.org # v4.6+ > Acked-by: Tom Herbert > Signed-off-by: Al Viro Applied.