Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4166A1A5B8A; Sat, 26 Sep 2026 00:11:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790381466; cv=none; b=l3TyQZaEH1KPdCkDxuylL/pS3cj0MW5HlxOXGhA3LhH2wxhyhWzgJC1LBfmJWoAtifiU8F0XRjX9YEBUzLnUVFhrQh6Ceo3AfSXUTvQezydbo3CNtzpZEym1RBMKyfPNKozv0sZ8C+Vup8RrVSJmHWbGKCKaLp7A0lwfPbuZdkw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790381466; c=relaxed/simple; bh=Rj8mrG4OhoDtc/K0+ngf1ncfakHuLIQICnf7WPsuw6U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i7rSsVzLy8f6Cz8useHwMan3QPsXzVfw2P0WJPMPlAVPkHMLmjoXhrcWL4B8t6BI2gdLe1SAGflV6t+h9VRG6BomvYrVE15uQvglW+eOvLhRlICkDPixM4XMA+cqx8NViRwxccDkcnXztoj61BDA8t+f887PN2NCX43rFVdu1w8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ownmail.net; spf=pass smtp.mailfrom=ownmail.net; dkim=pass (2048-bit key) header.d=ownmail.net header.i=@ownmail.net header.b=e5hpCYWh; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=GWoCeecN; arc=none smtp.client-ip=202.12.124.156 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ownmail.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ownmail.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ownmail.net header.i=@ownmail.net header.b="e5hpCYWh"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="GWoCeecN" Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49]) by mailfhigh.stl.internal (Postfix) with ESMTP id 2F1737A00D0; Fri, 25 Sep 2026 20:11:03 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Fri, 25 Sep 2026 20:11:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ownmail.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:subject:subject:to:to; s=fm1; t=1790381463; x=1790467863; bh=MnDjfXQvhYCS9cbXLtzi/mnGhccb8pedJ31lXybm9f8=; b= e5hpCYWhpXTswsxe+Flocjrxgg1QIG33ZOkhT+81FkQUXACAMohoJlKyXdiTYdjo WK5L4tdFE+hvyyE3AoHqBK92gZvHyh0PUbZEqh6/t/VmSp71VVe/zacCXa59XTN2 JihsJipgc3xz5OrBJVZF+jilNzw8KH+VqBSSWg+ZNnFwAowCvjMqVJsqmbeCxllx II94MjzXXfRrI9kohdKzSqu1tI+jj819IdTrHhPKgZHWZnOVQXS1iPhAyBJMGQID 6Y4veNwPQftsObCwMWGXpH/9oYeRgmIaIGPqT74S4kJlYosj2Qn0Z+Mq4uY944sR ms25k/87zQthpqi+dTv4tQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1790381463; x=1790467863; bh=M nDjfXQvhYCS9cbXLtzi/mnGhccb8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r+P6bA X-ME-Proxy: Feedback-ID: i9d664b8f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Sep 2026 20:11:00 -0400 (EDT) From: NeilBrown To: Trond Myklebust , Anna Schumaker , Alexander Viro , Christian Brauner Cc: Jeff Layton , Jan Kara , linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org Subject: [PATCH 2/9] nfs: fix nfs_call_unlink() Date: Sat, 26 Sep 2026 10:01:19 +1000 Message-ID: <20260926001011.401824-3-neilb@ownmail.net> X-Mailer: git-send-email 2.50.0.107.gf914562f5916.dirty In-Reply-To: <20260926001011.401824-1-neilb@ownmail.net> References: <20260926001011.401824-1-neilb@ownmail.net> Reply-To: NeilBrown Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: NeilBrown nfs_call_unlink() calls d_alloc_parallel() on a dentry which has not had the d_hash calculated. d_alloc_parallel() assume this is calculated and doesn't calculate it itself. So this will never find an existing dentry and so will not detect the races it aims to detect. This dentry ("alias") is never hashed so there is no lasting inconsistency in the dcache. Fixes: 565277f63c61 ("NFS: Fix a race in sillyrename") Signed-off-by: NeilBrown --- fs/nfs/unlink.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index c8d712204e64..11a46a993e11 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c @@ -125,6 +125,9 @@ static int nfs_call_unlink(struct dentry *dentry, struct inode *inode, struct nf struct dentry *alias; down_read_non_owner(&NFS_I(dir)->rmdir_sem); + data->args.name.hash = full_name_hash(dentry->d_parent, + data->args.name.name, + data->args.name.len); alias = d_alloc_parallel(dentry->d_parent, &data->args.name); if (IS_ERR(alias)) { up_read_non_owner(&NFS_I(dir)->rmdir_sem); -- 2.50.0.107.gf914562f5916.dirty