From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH 3/3] make sock_alloc_file() do sock_release() on failures Date: Fri, 01 Dec 2017 01:33:56 -0800 Message-ID: <1512120836.19682.33.camel@gmail.com> References: <20171201002027.GI21978@ZenIV.linux.org.uk> <20171201002325.GL21978@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit To: Al Viro , netdev@vger.kernel.org Return-path: Received: from mail-io0-f194.google.com ([209.85.223.194]:43595 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881AbdLAJd7 (ORCPT ); Fri, 1 Dec 2017 04:33:59 -0500 Received: by mail-io0-f194.google.com with SMTP id s37so10572495ioe.10 for ; Fri, 01 Dec 2017 01:33:59 -0800 (PST) In-Reply-To: <20171201002325.GL21978@ZenIV.linux.org.uk> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, 2017-12-01 at 00:23 +0000, Al Viro wrote: > 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. > > Signed-off-by: Al Viro > --- Nice cleanup ! Reviewed-by: Eric Dumazet