diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-12-11 09:16:26 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-12-11 09:16:26 -0500 |
commit | 7ce0171d4f78992184faed87ea897d730b972965 (patch) | |
tree | 71dba7444672eb10244566e6f0ed7829f1e3abf5 /fs/nfs/nfs4proc.c | |
parent | 1fa8064429d0acbf5bbf3c8a53f65679fdacc75e (diff) | |
parent | 81d9bce5309288086b58b4d97a644e495fef75f2 (diff) | |
download | blackbird-op-linux-7ce0171d4f78992184faed87ea897d730b972965.tar.gz blackbird-op-linux-7ce0171d4f78992184faed87ea897d730b972965.zip |
Merge branch 'bugfixes' into nfs-for-next
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 992233561dbd..92bd799eee01 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3782,8 +3782,13 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu goto out_free; } nfs4_write_cached_acl(inode, pages, res.acl_data_offset, res.acl_len); - if (buf) + if (buf) { + if (res.acl_len > buflen) { + ret = -ERANGE; + goto out_free; + } _copy_from_pages(buf, pages, res.acl_data_offset, res.acl_len); + } out_ok: ret = res.acl_len; out_free: |