mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-03 01:10:39 -05:00
nfsd: nfsd4_spo_must_allow() must check this is a v4 compound request
commit 1244f0b2c3cecd3f349a877006e67c9492b41807 upstream. 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 executed (rq_procinfo) is the NFSPROC4_COMPOUND procedure. Reported-by: Olga Kornievskaia <[email protected]> Cc: [email protected] Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: NeilBrown <[email protected]> Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
12134f79e5
commit
bf78a2706c
1 changed files with 2 additions and 1 deletions
|
|
@ -2750,7 +2750,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 == true)
|
||||
|
|
|
|||
Loading…
Reference in a new issue