All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix length of buffer copied in __nfs4_get_acl_uncached
@ 2012-03-22 16:46 Sachin Prabhu
  0 siblings, 0 replies; only message in thread
From: Sachin Prabhu @ 2012-03-22 16:46 UTC (permalink / raw)
  To: Linux NFS mailing list; +Cc: Trond Myklebust

_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>
---
 fs/nfs/nfs4proc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index caf92d0..68a55ed 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3605,7 +3605,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:
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-03-22 16:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-22 16:46 [PATCH] Fix length of buffer copied in __nfs4_get_acl_uncached Sachin Prabhu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.