From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 1FC563382CB; Sat, 12 Sep 2026 13:31:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789219874; cv=none; b=VKv4q8kxNmaWTAUQqx+mBv2S33IjP7n0hq4Cwbj4rGePorMYD24kNd7NwTd1pfOM/YtmqSUdqzvLms0cCHfvy9qZHVp86E1crHFMCp1Ftr3cp17zEdUsEEyCkY56GP9CcPGFAxyDcJYpNjEWb12HKBF0WJCEmS/tyZHgbfyxiug= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789219874; c=relaxed/simple; bh=+An6MBGoLOSpa64IzaDcRBPGMfXR1rD2ay32gM2FG+I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dLZ/uWzkpg7/W7ZDA7tLAP0k89FkwdvK2/yhkaa4hiFsqZgblt/2yY2OEYxeHxO+VRzLL9YGDy76mVmy4nDj6DaTLbDA2qYM++W2rh1ZILp5rc5AnwgOJNAZQhSvoZeWz6QDCRNoFfsuDia4wvxW6kts637cQqCfogmZyjABVIs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zcWPqxmR; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zcWPqxmR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD64F1F000FF; Sat, 12 Sep 2026 13:31:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789219873; bh=iMzo3QHEhuDG7IhfwxiZbGd0mqdtklkwnBGY5LeE8pc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=zcWPqxmRfgLaFwOo2f2suLSUQLNRfusPL/fpdJFxFHA7+8dJPr86w/xMJEK8HaUwR pfmtb/AhVVWAj4lJYRm72Pe0ehOdFWxU28/Kv/dDNLvcNXcL8iJ3MtnTPbNhSQr+YY GrdcxDpWMU5A/yOrAeZ25Uluk9wGaeMzwm+4gq1U= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jeff Layton , Chuck Lever Subject: [PATCH 6.6 0061/1424] nfsd: fix version mismatch loops in nfsd_acl_init_request() Date: Sat, 12 Sep 2026 08:41:33 +0200 Message-ID: <20260912065608.672704721@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.279695368@linuxfoundation.org> References: <20260912065607.279695368@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jeff Layton commit 9bc761051dcd9a4a8b59e64b2b185172d13c716d upstream. The loops that compute the supported version range for PROG_MISMATCH test nfsd_support_acl_version(rqstp->rq_vers) instead of nfsd_support_acl_version(i), so every iteration fails and the function returns rpc_prog_unavail instead of rpc_prog_mismatch. Replace rqstp->rq_vers with the loop variable i, matching the pattern used by the sibling nfsd_init_request() function. Fixes: e333f3bbefe3 ("nfsd: Allow containers to set supported nfs versions") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Jeff Layton Link: https://patch.msgid.link/20260611-nfsd-testing-v2-9-5b90e276f2d9@kernel.org Signed-off-by: Chuck Lever Signed-off-by: Greg Kroah-Hartman --- fs/nfsd/nfssvc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -858,7 +858,7 @@ nfsd_acl_init_request(struct svc_rqst *r ret->mismatch.lovers = NFSD_ACL_NRVERS; for (i = NFSD_ACL_MINVERS; i < NFSD_ACL_NRVERS; i++) { - if (nfsd_support_acl_version(rqstp->rq_vers) && + if (nfsd_support_acl_version(i) && nfsd_vers(nn, i, NFSD_TEST)) { ret->mismatch.lovers = i; break; @@ -868,7 +868,7 @@ nfsd_acl_init_request(struct svc_rqst *r return rpc_prog_unavail; ret->mismatch.hivers = NFSD_ACL_MINVERS; for (i = NFSD_ACL_NRVERS - 1; i >= NFSD_ACL_MINVERS; i--) { - if (nfsd_support_acl_version(rqstp->rq_vers) && + if (nfsd_support_acl_version(i) && nfsd_vers(nn, i, NFSD_TEST)) { ret->mismatch.hivers = i; break;