aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2005-06-22 13:16:28 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 16:07:27 -0400
commit213484254c65e3c39c59df454132748b1367f816 (patch)
treebba8225be09a04f23a34ee0e93b9fa1090f3bf8f /fs/nfs
parent458818ed76d3f495f9f32373c936456c9427f759 (diff)
[PATCH] fix nfsacl pointer arithmetic and pg_class initialization bugs
* Pointer arithmetic bug: p is in word units. This fixes a memory corruption with big acls. * Initialize pg_class to prevent a NULL pointer access. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs3xdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
index a4437fb177f0..db4a904810a4 100644
--- a/fs/nfs/nfs3xdr.c
+++ b/fs/nfs/nfs3xdr.c
@@ -677,7 +677,7 @@ nfs3_xdr_setaclargs(struct rpc_rqst *req, u32 *p,
677 /* put as much of the acls into head as possible. */ 677 /* put as much of the acls into head as possible. */
678 len_in_head = min_t(unsigned int, buf->head->iov_len - base, len); 678 len_in_head = min_t(unsigned int, buf->head->iov_len - base, len);
679 len -= len_in_head; 679 len -= len_in_head;
680 req->rq_slen = xdr_adjust_iovec(req->rq_svec, p + len_in_head); 680 req->rq_slen = xdr_adjust_iovec(req->rq_svec, p + (len_in_head >> 2));
681 681
682 for (count = 0; (count << PAGE_SHIFT) < len; count++) { 682 for (count = 0; (count << PAGE_SHIFT) < len; count++) {
683 args->pages[count] = alloc_page(GFP_KERNEL); 683 args->pages[count] = alloc_page(GFP_KERNEL);