From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0C0EF299A84; Sun, 1 Mar 2026 01:34:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772328892; cv=none; b=uCEOHTb2tTPwp3r46gd038FFQo20xKRb2mn0jQfKta9QLP5eM2GbXJPV9C8tXMmtoyNmdC8I+MFDm0MOzR1yi9gOUAEBdJAjanWJFm9rwVo2vnFb018oOltrm3Uf9ufsgn3sZzP/dnJo/svyQmdOaXvYvCI/uoIUQ3c0/KkvXhs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772328892; c=relaxed/simple; bh=8DCQeCSSWvQHYJdYiVuUEkRQe1ZKNmF2R7rsNIhlDy4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ce1943rHVlos88xzH9oeYgCL0zTpRlPZPlJ+OfeFxSv5ICL60OumrQkrxz5Uw9O4dZZ1SzTFEDgAQYqmWz2rPIT0hUtu22iNu2r4QBWZMSvW4LsKGhoRTnULN1hGMOas3dMFr94nEUF0l0x1T5JJW3L34uLUOEhcAwaUyoVHjPk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bENkxgun; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bENkxgun" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52717C19421; Sun, 1 Mar 2026 01:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772328891; bh=8DCQeCSSWvQHYJdYiVuUEkRQe1ZKNmF2R7rsNIhlDy4=; h=From:To:Cc:Subject:Date:From; b=bENkxgunRdyORKPnUaYOuK7p/nwLzlQCqyR/9+6vIAoc8k4DvW+Aga2oKOlbv21nB k8svYg6G0KEtRU46/l8ZoKj+pXTld9tfScNzTz6l3Co5fu9X6SmgNYbNYMJ+A1k52s gqkpOMta8c9dwhQo/tjuMBEPny+Tu6qklPeo0UyNIXYrz7tKZPO50kqjN6xY70W4uF jNaYufvK4olo2PdCzSSti6fNmU4PmI8+uhOh350tBVDU3rrfbSqiKO3uaYWMTOeleJ k5kXTJb72MCaNEUik4KALx8Ki9V+pjUVIMCjJ2nzia+tXOhBFnv36c98BMepcSnl6l mJeBhJfPo/y2w== From: Sasha Levin To: stable@vger.kernel.org, ailiop@suse.com Cc: NeilBrown , Chuck Lever , linux-nfs@vger.kernel.org Subject: FAILED: Patch "nfsd: fix return error code for nfsd_map_name_to_[ug]id" failed to apply to 6.6-stable tree Date: Sat, 28 Feb 2026 20:34:49 -0500 Message-ID: <20260301013450.1694419-1-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.6-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Thanks, Sasha ------------------ original commit in Linus's tree ------------------ >From 404d779466646bf1461f2090ff137e99acaecf42 Mon Sep 17 00:00:00 2001 From: Anthony Iliopoulos Date: Mon, 22 Dec 2025 14:30:05 -0500 Subject: [PATCH] nfsd: fix return error code for nfsd_map_name_to_[ug]id idmap lookups can time out while the cache is waiting for a userspace upcall reply. In that case cache_check() returns -ETIMEDOUT to callers. The nfsd_map_name_to_[ug]id functions currently proceed with attempting to map the id to a kuid despite a potentially temporary failure to perform the idmap lookup. This results in the code returning the error NFSERR_BADOWNER which can cause client operations to return to userspace with failure. Fix this by returning the failure status before attempting kuid mapping. This will return NFSERR_JUKEBOX on idmap lookup timeout so that clients can retry the operation instead of aborting it. Fixes: 65e10f6d0ab0 ("nfsd: Convert idmap to use kuids and kgids") Cc: stable@vger.kernel.org Signed-off-by: Anthony Iliopoulos Reviewed-by: NeilBrown Signed-off-by: Chuck Lever --- fs/nfsd/nfs4idmap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index b5b3d45979c9b..c319c31b0f647 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c @@ -672,6 +672,8 @@ __be32 nfsd_map_name_to_uid(struct svc_rqst *rqstp, const char *name, return nfserr_inval; status = do_name_to_id(rqstp, IDMAP_TYPE_USER, name, namelen, &id); + if (status) + return status; *uid = make_kuid(nfsd_user_namespace(rqstp), id); if (!uid_valid(*uid)) status = nfserr_badowner; @@ -707,6 +709,8 @@ __be32 nfsd_map_name_to_gid(struct svc_rqst *rqstp, const char *name, return nfserr_inval; status = do_name_to_id(rqstp, IDMAP_TYPE_GROUP, name, namelen, &id); + if (status) + return status; *gid = make_kgid(nfsd_user_namespace(rqstp), id); if (!gid_valid(*gid)) status = nfserr_badowner; -- 2.51.0