From: Jeff Layton <jlayton@kernel.org>
To: NeilBrown <neil@brown.name>, Chuck Lever <chuck.lever@oracle.com>,
Olga Kornievskaia <okorniev@redhat.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfsd: nfsd4_spo_must_allow() must check this is a v4 compound request
Date: Tue, 08 Apr 2025 10:19:19 -0400 [thread overview]
Message-ID: <7a356f692d1364f7dec80fb97a13442a8792c654.camel@kernel.org> (raw)
In-Reply-To: <174312035952.9342.9287917468081272195@noble.neil.brown.name>
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@redhat.com>
> Signed-off-by: NeilBrown <neil@brown.name>
> ---
> 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@kernel.org>
next prev parent reply other threads:[~2025-04-08 14:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-28 0:05 [PATCH] nfsd: nfsd4_spo_must_allow() must check this is a v4 compound request NeilBrown
2025-04-08 14:19 ` Jeff Layton [this message]
2025-04-10 14:29 ` cel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7a356f692d1364f7dec80fb97a13442a8792c654.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox