Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10805588pxu; Wed, 30 Dec 2020 12:07:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfzTSD0S4W8N7RbcwSXkbSs+UPzKxZg7544xpasj7LzxO67LB+eMOTy8EBCDreIJbhxX64 X-Received: by 2002:a17:906:1b46:: with SMTP id p6mr52490817ejg.68.1609358873827; Wed, 30 Dec 2020 12:07:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609358873; cv=none; d=google.com; s=arc-20160816; b=B7CSPF1lnfV347xfKlRo/AkFLIAuGj/GkaT1lQ6jRAHAM1UP5Wkp6TEsKZUw/l7uYp AmR2AFUWMrfk/LNVZumeIwbs8BwA37csWG/CJU8KyGPl64d73j7MsKKS6ZYLyM0PdS3h RqpoX3FH/d5c7t8Delc5j0lfqVO7yDsJGwoXJ3PQGuaHMN1o/yjjfnSTbLoWtHHf+hTb aetVdAHCpcftXrKoRv/rzfRdGtZvqbpPF07bCfHs3u69zMkoIPqG1sbKhfAOCwzsGKZs RPQOd2i27xxgLJttcsAPAm0HCuMIS5d5HBZTMm/5ovfA1B3oF/fpc3nYpFJkwyeE/n5z sDzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=9xOoXgtuDDRnxQSsB23thR0cwxxiHeADxvEsZOmJqEw=; b=z3q/p56lGgN2Hg7XKn0/CkURFrhbyqFIefXzui3lJBIkzCW/0usuQj9aETWnjoCZuk 1PPTWMQal0l9jYGrEsoWZ2fBZBBJfeJmw7nPYl3dJC+k11qb4twLBx7jY4AmCTnzOJ3+ sgK0hTHOtbiD1HAf+vVX3yoMIegNjiYAy/sEgemogFproOsF4v17fEWEYHoIHBWJgul5 11P+QgVpwbUBO6OPHY+9Uo4sKYNTNt1SFLFDGBcUHdOArnLs+Pp5XFEyquJqW5M+5ina mjQcBbYheiLDBhqCRDYoezy+tbtDr31BD5TchMKbsbsfOk/A9Gs3UY/wvTJcmRcbosn0 iZog== ARC-Authentication-Results: i=1; mx.google.com; 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 ck9si22205159edb.586.2020.12.30.12.07.17; Wed, 30 Dec 2020 12:07:53 -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; 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 S1726305AbgL3UFg (ORCPT + 99 others); Wed, 30 Dec 2020 15:05:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbgL3UFf (ORCPT ); Wed, 30 Dec 2020 15:05:35 -0500 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B22AC061573; Wed, 30 Dec 2020 12:04:55 -0800 (PST) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kuhiD-005WfQ-Tp; Wed, 30 Dec 2020 20:04:50 +0000 Date: Wed, 30 Dec 2020 20:04:49 +0000 From: Al Viro To: YANG LI Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs: fix: second lock in function d_prune_aliases(). Message-ID: <20201230200449.GF3579531@ZenIV.linux.org.uk> References: <1609311685-99562-1-git-send-email-abaci-bugfix@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1609311685-99562-1-git-send-email-abaci-bugfix@linux.alibaba.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. NAK.