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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, 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 9BA9CC433E6 for ; Wed, 30 Dec 2020 20:05:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 58F1122262 for ; Wed, 30 Dec 2020 20:05:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726261AbgL3UFg (ORCPT ); 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-fsdevel@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.