From e0bb6bda43e20aa1db5774c73a519cd52c463a55 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Mon, 27 Dec 2010 01:41:54 +0900 Subject: [PATCH] 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 Cc: Christoph Hellwig Signed-off-by: Al Viro --- fs/compat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/compat.c b/fs/compat.c index c62b5e6a1c15..f6fd0a00e6cc 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; } -- 2.20.1