diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-08-01 14:21:12 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-09-26 12:43:10 -0400 |
commit | 13fe4ba1b64c099843c75b4f0633ad30a4526637 (patch) | |
tree | 28d579d3ed2cccf72f77963fbf6e5f15eff4ee92 /fs/nfs/nfs4xdr.c | |
parent | 8a9a8b8332b92b13316cf49685b5dc5257cfe115 (diff) |
NFSv4.1: decode_getdeviceinfo should check xdr_read_pages() return value
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 8dba6bd48557..a756349b0fa4 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -5642,7 +5642,8 @@ static int decode_getdeviceinfo(struct xdr_stream *xdr, | |||
5642 | * and places the remaining xdr data in xdr_buf->tail | 5642 | * and places the remaining xdr data in xdr_buf->tail |
5643 | */ | 5643 | */ |
5644 | pdev->mincount = be32_to_cpup(p); | 5644 | pdev->mincount = be32_to_cpup(p); |
5645 | xdr_read_pages(xdr, pdev->mincount); /* include space for the length */ | 5645 | if (xdr_read_pages(xdr, pdev->mincount) != pdev->mincount) |
5646 | goto out_overflow; | ||
5646 | 5647 | ||
5647 | /* Parse notification bitmap, verifying that it is zero. */ | 5648 | /* Parse notification bitmap, verifying that it is zero. */ |
5648 | p = xdr_inline_decode(xdr, 4); | 5649 | p = xdr_inline_decode(xdr, 4); |