Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10852945pxu; Wed, 30 Dec 2020 13:41:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzAUwwBNX0iG4TM94FczQYlEmrTAW/53yhQdybeJ4g8OMDiwVqVdep5hsEgFdjHPiiNqlna X-Received: by 2002:a05:6402:8da:: with SMTP id d26mr50512232edz.157.1609364474001; Wed, 30 Dec 2020 13:41:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609364473; cv=none; d=google.com; s=arc-20160816; b=iUQHj07Cat+IEuO5BIyFcswEBJi3W1l3KX+NuhjZXl4IL80lW8tNL2ji9hkSZCFHaR xcpq3cuNjJ1t3jxBY1fx0gz/g53fSTPPurYu6NW4mzfk3qa1aSMCkb/9qzkwSv1oKS97 EhSUi6iM5g2OEkdKOA1iidWNo3XMgsu4zGG7O1bNOWZbEvN8ymeQvXGg36eN4CXUnzWA cI/8/uIZiMqeMsdY1+sCYSgmrDSs6WoGjtz/Kaw6mJ/MfsngLJpvQie9DVC86kxQdGc/ ce2JjUtcupfjSkZylavbtqUXHx1rpZ7m01sKdf0TjZdBQp+NykCTu8FcbG1Ugeq/+n7U 3PqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=x5hbWwksukb8/0wEBDh++Rv5diH8gy8V0T7YtvmU4ss=; b=ZJHyx//E1QyNr8IKu1WqE6wHZgVECU9zfaJ6+NmuCPPPboFh4UG0zacerzxUVx7mYR WOb2+mIP7ZNdlwD93w/pAMwgVlgfEliKKq60zm5vec9KVJGozzftx34ajKg44vdw5AQ+ o2u21aY09YeB/9q8mxLb6DjmYGH5wHSY0esBSGzJ+nmy37alYcE8a9Jix6EvFrtLn+qx OWoC5T/rOQst2HEZgwQNJ6PG2qW1yMVW8XbTkHdwGBkdouGIbbZ4Nq8LK1s0YCAQ6XQl 3Tdm8SMfENYISf0gexPalfsph0q3mfkpHbivaOZh++1iRKl36LBbACBsKI/yYd3GxIB2 zAzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="Bpk/eKrM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j14si22847597ejy.327.2020.12.30.13.40.50; Wed, 30 Dec 2020 13:41:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="Bpk/eKrM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726567AbgL3Vhc (ORCPT + 99 others); Wed, 30 Dec 2020 16:37:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726292AbgL3Vhb (ORCPT ); Wed, 30 Dec 2020 16:37:31 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66B99C061573; Wed, 30 Dec 2020 13:36:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=x5hbWwksukb8/0wEBDh++Rv5diH8gy8V0T7YtvmU4ss=; b=Bpk/eKrMv0ipYNfN1Y3N2fPfeg Utl9j8h2Q9cG7pglDxwqYKt0Rq38KDs5/NuOMQUqEOdZ9bXwAMIyg3okjT+jlOrxAMzfAIvewEftu xnIryAzIZCCvTVyYLbXkufF80ahQgMycI5zzTQUfalzhtGboCi80QKnSDrS6AjaOSmbwb0iUGGKAU zdORkBOA8IAKkrCNkdn62u4c7QwMyf8NIDv7XQrry1rt0Y59eaXByRcGWxGdOmu4Y0CjydmE7PbKl PFIyHr5bkIdiwfRBr2CuyinpGxESycv7Wmu11lUiTU7/hCfExhLtalGAy8vrxc7WUh3HlFmjx85Qi r1jDEbBw==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1kuj92-0004zV-VA; Wed, 30 Dec 2020 21:36:38 +0000 Date: Wed, 30 Dec 2020 21:36:36 +0000 From: Matthew Wilcox To: Al Viro Cc: YANG LI , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs: fix: second lock in function d_prune_aliases(). Message-ID: <20201230213636.GA18640@casper.infradead.org> References: <1609311685-99562-1-git-send-email-abaci-bugfix@linux.alibaba.com> <20201230200449.GF3579531@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201230200449.GF3579531@ZenIV.linux.org.uk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 30, 2020 at 08:04:49PM +0000, Al Viro wrote: > On Wed, Dec 30, 2020 at 03:01:25PM +0800, YANG LI wrote: > > Goto statement jumping will cause lock to be executed again without > > executing unlock, placing the lock statement in front of goto > > label to fix this problem. > > > > Signed-off-by: YANG LI > > Reported-by: Abaci > > I am sorry, but have you even attempted to trigger that codepath? > Just to test your patch... > > FWIW, the patch is completely broken. Obviously so, since you > have dput() done just before goto restart and dput() in very > much capable of blocking. It should never be called with spinlocks > held. And if you look at __dentry_kill() (well, dentry_unlink_inode() > called by __dentry_kill()), you will see that it bloody well *DOES* > drop inode->i_lock. Not only that, but the function is even _annotated_ to that effect. So this 'abaci' tool you have isn't even capable of the bare minimum.