]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Fix length of buffer copied in __nfs4_get_acl_uncached
authorSachin Prabhu <sprabhu@redhat.com>
Thu, 22 Mar 2012 16:46:28 +0000 (16:46 +0000)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 24 Mar 2012 18:33:26 +0000 (14:33 -0400)
_copy_from_pages() used to copy data from the temporary buffer to the
user passed buffer is passed the wrong size parameter when copying
data. res.acl_len contains both the bitmap and acl lenghts while
acl_len contains the acl length after adjusting for the bitmap size.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c

index e809d2305ebf3a6431c52a6f0a805672365557fb..45df7d4a3acc1f92e18822b5285eb9d603ebe52b 100644 (file)
@@ -3712,7 +3712,7 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu
                if (acl_len > buflen)
                        goto out_free;
                _copy_from_pages(buf, pages, res.acl_data_offset,
-                               res.acl_len);
+                               acl_len);
        }
        ret = acl_len;
 out_free: