mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 08:15:07 -04:00
nfsd: fix version mismatch loops in nfsd_acl_init_request()
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: e333f3bbef ("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 <jlayton@kernel.org>
Link: https://patch.msgid.link/20260611-nfsd-testing-v2-9-5b90e276f2d9@kernel.org
Signed-off-by: Chuck Lever <cel@kernel.org>
This commit is contained in:
@@ -821,7 +821,7 @@ nfsd_acl_init_request(struct svc_rqst *rqstp,
|
||||
|
||||
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;
|
||||
@@ -831,7 +831,7 @@ nfsd_acl_init_request(struct svc_rqst *rqstp,
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user