aboutsummaryrefslogtreecommitdiff
path: root/fs/compat.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-12-27 01:41:54 +0900
committerAl Viro <viro@zeniv.linux.org.uk>2011-01-17 04:54:38 -0500
commite0bb6bda43e20aa1db5774c73a519cd52c463a55 (patch)
tree84af59ed571cda0a3b023caf50b2b538ac5c2554 /fs/compat.c
parent974d879e8070bbb132bd4e79ef314703853d0b82 (diff)
compat: copy missing fields in compat_statfs64 to user
f_flags and f_spare fields were not copied to userspace when compat_sys_[f]statfs64 called. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/compat.c')
-rw-r--r--fs/compat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/compat.c b/fs/compat.c
index c62b5e6a1c1..f6fd0a00e6c 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;
}