mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
nfsd: fix oops on unsupported operation
I'm hitting the BUG in nfsd4_max_reply() at fs/nfsd/nfs4proc.c:2495 when
client sends an operation the server doesn't support.
in nfsd4_max_reply() it checks for NULL rsize_bop but a non-supported
operation wouldn't have that set.
Cc: Kinglong Mee <[email protected]>
Fixes: 2282cd2c05 "NFSD: Get response size before operation..."
Signed-off-by: J. Bruce Fields <[email protected]>
This commit is contained in:
parent
23abec20aa
commit
05b7278d51
1 changed files with 1 additions and 1 deletions
|
|
@ -2489,7 +2489,7 @@ bool nfsd4_spo_must_allow(struct svc_rqst *rqstp)
|
|||
|
||||
int nfsd4_max_reply(struct svc_rqst *rqstp, struct nfsd4_op *op)
|
||||
{
|
||||
if (op->opnum == OP_ILLEGAL)
|
||||
if (op->opnum == OP_ILLEGAL || op->status == nfserr_notsupp)
|
||||
return op_encode_hdr_size * sizeof(__be32);
|
||||
|
||||
BUG_ON(OPDESC(op)->op_rsize_bop == NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue