diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-11-22 03:41:08 +0100 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-12-02 20:05:54 +0100 |
commit | 17068466ad02d3ec07ab1b8f3f97928598affc9a (patch) | |
tree | fc312ee014b88b13611448d9f82db615a14ad9c2 /fs/nfs/nfs4xdr.c | |
parent | SUNRPC: Fix open coded xdr_stream_remaining() (diff) | |
download | linux-17068466ad02d3ec07ab1b8f3f97928598affc9a.tar.xz linux-17068466ad02d3ec07ab1b8f3f97928598affc9a.zip |
NFSv4: Fix open coded xdr_stream_remaining()
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 3899ef3047f4..de69276cfd22 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -5337,11 +5337,11 @@ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req, res->acl_len = attrlen; /* Check for receive buffer overflow */ - if (res->acl_len > (xdr->nwords << 2) || + if (res->acl_len > xdr_stream_remaining(xdr) || res->acl_len + res->acl_data_offset > xdr->buf->page_len) { res->acl_flags |= NFS4_ACL_TRUNC; - dprintk("NFS: acl reply: attrlen %u > page_len %u\n", - attrlen, xdr->nwords << 2); + dprintk("NFS: acl reply: attrlen %u > page_len %zu\n", + attrlen, xdr_stream_remaining(xdr)); } } else status = -EOPNOTSUPP; |