diff options
author | Olga Kornievskaia <aglo@umich.edu> | 2017-03-23 14:36:20 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-04-13 11:18:56 -0400 |
commit | 05b7278d510a6a1c23624caee5b0a9667a72e745 (patch) | |
tree | 0e27a8342effb31b05f80235a355ba32e90ac0b6 /fs | |
parent | 23abec20aa7034c5d49b62c0a668f7291c819fab (diff) | |
download | linux-05b7278d510a6a1c23624caee5b0a9667a72e745.tar.bz2 |
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 <kinglongmee@gmail.com>
Fixes: 2282cd2c05e2 "NFSD: Get response size before operation..."
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index cbeeda1e94a2..d86031b6ad79 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -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); |