From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9C97C433E0 for ; Wed, 24 Feb 2021 01:10:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A997264E09 for ; Wed, 24 Feb 2021 01:10:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233253AbhBXBKL (ORCPT ); Tue, 23 Feb 2021 20:10:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:32782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234383AbhBXAoN (ORCPT ); Tue, 23 Feb 2021 19:44:13 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B9ED060C3E; Wed, 24 Feb 2021 00:40:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614127230; bh=B9KRZo0voEyKZK+SLYtkKhTZe66u0VoBC9SE8Szq7Sk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pYy+nzg2Ig72u2lWGdkgoJFChLv5LnVuqvRPOpvFCMUARd9XFO3m7dozQyoQVWI3w 9YLAXGshyTqkW2ltj6ckNGZtbjgpcxPlmOM0Rwrz2bNKQjgmog/ELHbAYSZCH0e+OV jlx1NH6of293Pn7BIphj+CX+TaP6iaawBBND//VGrHHEGCICuRI59ZPKqFNVXiLy/m +qxNYjWzgeMfUXXQImQ/yj48uZ/TfCIvDzBVPd1hgJtbGdkIhFqIK/KGo4p2NvTPZH e9PaOpSxwPUaSGWveXe9Zf+ZCRFBPSPdkxmp1nyJw9tBvMg9MHUHCb0Mknza3rDbYs syh6RRvuE8Jng== Date: Tue, 23 Feb 2021 16:40:26 -0800 From: Jakub Kicinski To: Al Viro Cc: netdev@vger.kernel.org, Denis Kirjanov , Christoph Hellwig , LKML , linux-fsdevel , Cong Wang Subject: Re: [PATCHSET] making unix_bind() undo mknod on failure Message-ID: <20210223164026.01b56449@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <20210129131855.GA2346744@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, 22 Feb 2021 19:06:00 +0000 Al Viro wrote: > On Sat, Feb 20, 2021 at 09:08:56PM +0000, Al Viro wrote: > > > *shrug* > > > > If anything, __unix_complete_bind() might make a better name for that, > > with dropping ->bindlock also pulled in, but TBH I don't have sufficiently > > strong preferences - might as well leave dropping the lock to caller. > > > > I'll post that series to netdev tonight. > > Took longer than I hoped... Anyway, here's the current variant; > it's 5.11-based, lives in > git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git misc.af_unix > > Shortlog: > Al Viro (8): > af_unix: take address assignment/hash insertion into a new helper > unix_bind(): allocate addr earlier > unix_bind(): separate BSD and abstract cases > unix_bind(): take BSD and abstract address cases into new helpers > fold unix_mknod() into unix_bind_bsd() > unix_bind_bsd(): move done_path_create() call after dealing with ->bindlock > unix_bind_bsd(): unlink if we fail after successful mknod > __unix_find_socket_byname(): don't pass hash and type separately > > Diffstat: > net/unix/af_unix.c | 186 +++++++++++++++++++++++++++-------------------------- > 1 file changed, 94 insertions(+), 92 deletions(-) > > The actual fix is in #7/8, the first 6 are massage in preparation to that > and #8/8 is a minor followup cleanup. Individual patches in followups. Dave is out this week, but this looks good to me. You said "please review" - I'm assuming you'll send these to Linus yourself, so: Acked-by: Jakub Kicinski