On Fri, 2025-03-28 at 11:05 +1100, NeilBrown wrote: > If the request being processed is not a v4 compound request, then > examining the cstate can have undefined results. > > This patch adds a check that the rpc procedure being execute > (rq_procinfo) is the NFSPROC4_COMPOUND procedure. > > Reported-by: Olga Kornievskaia <okorniev@xxxxxxxxxx> > Signed-off-by: NeilBrown <neil@xxxxxxxxxx> > --- > fs/nfsd/nfs4proc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c > index 5860f3825be2..7295776b4ccb 100644 > --- a/fs/nfsd/nfs4proc.c > +++ b/fs/nfsd/nfs4proc.c > @@ -3768,7 +3768,8 @@ bool nfsd4_spo_must_allow(struct svc_rqst *rqstp) > struct nfs4_op_map *allow = &cstate->clp->cl_spo_must_allow; > u32 opiter; > > - if (!cstate->minorversion) > + if (rqstp->rq_procinfo != &nfsd_version4.vs_proc[NFSPROC4_COMPOUND] || > + cstate->minorversion == 0) > return false; > > if (cstate->spo_must_allowed) Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>