*@ret_pointer is initialized to @fast_pointer thus the assignment is
redundant.
Signed-off-by: Namhyung Kim <[email protected]>
Cc: Jeff Moyer <[email protected]>
---
fs/compat.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/fs/compat.c b/fs/compat.c
index b074e9f79148..0a22f973f4b5 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -597,10 +597,8 @@ ssize_t compat_rw_copy_check_uvector(int type,
if (nr_segs > fast_segs) {
ret = -ENOMEM;
iov = kmalloc(nr_segs*sizeof(struct iovec), GFP_KERNEL);
- if (iov == NULL) {
- *ret_pointer = fast_pointer;
+ if (iov == NULL)
goto out;
- }
}
*ret_pointer = iov;
--
1.7.3.4.600.g982838b0
The commit 7ed1ee6118ae ("Take statfs variants to fs/statfs.c")
separates out statfs syscalls from fs/open.c. Thus the comment
should be changed also.
Signed-off-by: Namhyung Kim <[email protected]>
Cc: Jiri Kosina <[email protected]>
---
fs/compat.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/compat.c b/fs/compat.c
index 0a22f973f4b5..037df434b038 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -257,7 +257,7 @@ static int put_compat_statfs(struct compat_statfs __user *ubuf, struct kstatfs *
}
/*
- * The following statfs calls are copies of code from fs/open.c and
+ * The following statfs calls are copies of code from fs/statfs.c and
* should be checked against those from time to time
*/
asmlinkage long compat_sys_statfs(const char __user *pathname, struct compat_statfs __user *buf)
--
1.7.3.4.600.g982838b0
f_flags and f_spare fields were not copied to userspace when
compat_sys_[f]statfs64 called.
Signed-off-by: Namhyung Kim <[email protected]>
Cc: Christoph Hellwig <[email protected]>
---
It seems struct compat_statfs lacks the f_flags field in it but I'm not
sure whether it is intended or not. Is it useful if I make a patch for
it too?
fs/compat.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/fs/compat.c b/fs/compat.c
index 037df434b038..2524511518e7 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -320,7 +320,9 @@ static int put_compat_statfs64(struct compat_statfs64 __user *ubuf, struct kstat
__put_user(kbuf->f_namelen, &ubuf->f_namelen) ||
__put_user(kbuf->f_fsid.val[0], &ubuf->f_fsid.val[0]) ||
__put_user(kbuf->f_fsid.val[1], &ubuf->f_fsid.val[1]) ||
- __put_user(kbuf->f_frsize, &ubuf->f_frsize))
+ __put_user(kbuf->f_frsize, &ubuf->f_frsize) ||
+ __put_user(kbuf->f_flags, &ubuf->f_flags) ||
+ __clear_user(ubuf->f_spare, sizeof(ubuf->f_spare)))
return -EFAULT;
return 0;
}
--
1.7.3.4.600.g982838b0
On Mon, Dec 27, 2010 at 01:41:54AM +0900, Namhyung Kim wrote:
> f_flags and f_spare fields were not copied to userspace when
> compat_sys_[f]statfs64 called.
>
> Signed-off-by: Namhyung Kim <[email protected]>
> Cc: Christoph Hellwig <[email protected]>
> ---
> It seems struct compat_statfs lacks the f_flags field in it but I'm not
> sure whether it is intended or not. Is it useful if I make a patch for
> it too?
Looks good. We discussed this a while back before it fell under the
table again.
Reviewed-by: Christoph Hellwig <[email protected]>