Skip to content

Commit 05b7278

Browse files
olgakornJ. Bruce Fields
authored andcommitted
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: 2282cd2 "NFSD: Get response size before operation..." Signed-off-by: J. Bruce Fields <bfields@redhat.com>
1 parent 23abec2 commit 05b7278

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfsd/nfs4proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2489,7 +2489,7 @@ bool nfsd4_spo_must_allow(struct svc_rqst *rqstp)
24892489

24902490
int nfsd4_max_reply(struct svc_rqst *rqstp, struct nfsd4_op *op)
24912491
{
2492-
if (op->opnum == OP_ILLEGAL)
2492+
if (op->opnum == OP_ILLEGAL || op->status == nfserr_notsupp)
24932493
return op_encode_hdr_size * sizeof(__be32);
24942494

24952495
BUG_ON(OPDESC(op)->op_rsize_bop == NULL);

0 commit comments

Comments
 (0)