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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 AF7E1C433E0 for ; Mon, 22 Feb 2021 19:29:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78EB664E25 for ; Mon, 22 Feb 2021 19:29:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233337AbhBVT2z (ORCPT ); Mon, 22 Feb 2021 14:28:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230297AbhBVTZn (ORCPT ); Mon, 22 Feb 2021 14:25:43 -0500 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45DDEC061574; Mon, 22 Feb 2021 11:24:59 -0800 (PST) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94 #2 (Red Hat Linux)) id 1lEGpC-00HBPx-PP; Mon, 22 Feb 2021 19:24:54 +0000 Date: Mon, 22 Feb 2021 19:24:54 +0000 From: Al Viro To: netdev@vger.kernel.org Cc: Denis Kirjanov , Christoph Hellwig , LKML , Jakub Kicinski , linux-fsdevel , Cong Wang Subject: Re: [PATCHSET] making unix_bind() undo mknod on failure Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Feb 22, 2021 at 07:12:29PM +0000, Al Viro wrote: > On Mon, Feb 22, 2021 at 07:06:00PM +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. > > Please, review. > > Argh... git send-email is playing silly buggers again ;-/ Cute - looks like having EMAIL in environment confuses the living hell out git-send-email. Oh, well...