diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2015-09-24 20:58:16 +0800 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-10-21 15:49:23 -0500 |
commit | 403889c0399c01a12877e3736ae1e96c9ded27be (patch) | |
tree | 7e6843c179a2c98d9e3a973a484c104030d3bef7 /fs/nfs | |
parent | 45724e8a5b2a69b9524fd16ff73345fab9aae279 (diff) | |
download | op-kernel-dev-403889c0399c01a12877e3736ae1e96c9ded27be.zip op-kernel-dev-403889c0399c01a12877e3736ae1e96c9ded27be.tar.gz |
NFS: Fix bad checking of max taglen in callback request
The taglen should be checked with CB_OP_TAGLEN_MAXSZ directly.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/callback_xdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index 9f0f0f6..4ad39fe 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c @@ -159,7 +159,7 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound if (unlikely(status != 0)) return status; /* We do not like overly long tags! */ - if (hdr->taglen > CB_OP_TAGLEN_MAXSZ - 12) { + if (hdr->taglen > CB_OP_TAGLEN_MAXSZ) { printk("NFS: NFSv4 CALLBACK %s: client sent tag of length %u\n", __func__, hdr->taglen); return htonl(NFS4ERR_RESOURCE); |