From 1c33c002c51a8f891daa41df1e012c6974284d77 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Mon, 17 Oct 2011 13:40:02 -0700 Subject: [PATCH] --- yaml --- r: 270017 b: refs/heads/master c: 1448c721e4fa2faf742029a0403b4b787fccb7fa h: refs/heads/master i: 270015: da1c51b67c9fdaa41f6239ff81564b3422654cc6 v: v3 --- [refs] | 2 +- trunk/arch/mips/include/asm/compat.h | 3 ++- trunk/arch/parisc/include/asm/compat.h | 3 ++- trunk/arch/powerpc/include/asm/compat.h | 3 ++- trunk/arch/s390/include/asm/compat.h | 3 ++- trunk/arch/sparc/include/asm/compat.h | 3 ++- trunk/arch/x86/include/asm/compat.h | 3 ++- trunk/fs/compat.c | 7 ++----- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index a18bd868527f..f7cf13aa7194 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a877ee03ac010ded434b77f7831f43cbb1fcc60f +refs/heads/master: 1448c721e4fa2faf742029a0403b4b787fccb7fa diff --git a/trunk/arch/mips/include/asm/compat.h b/trunk/arch/mips/include/asm/compat.h index dbc51065df5b..b77df0366ee6 100644 --- a/trunk/arch/mips/include/asm/compat.h +++ b/trunk/arch/mips/include/asm/compat.h @@ -111,7 +111,8 @@ struct compat_statfs { int f_bavail; compat_fsid_t f_fsid; int f_namelen; - int f_spare[6]; + int f_flags; + int f_spare[5]; }; #define COMPAT_RLIM_INFINITY 0x7fffffffUL diff --git a/trunk/arch/parisc/include/asm/compat.h b/trunk/arch/parisc/include/asm/compat.h index efa0b60c63fe..760f331d4fa3 100644 --- a/trunk/arch/parisc/include/asm/compat.h +++ b/trunk/arch/parisc/include/asm/compat.h @@ -105,7 +105,8 @@ struct compat_statfs { __kernel_fsid_t f_fsid; s32 f_namelen; s32 f_frsize; - s32 f_spare[5]; + s32 f_flags; + s32 f_spare[4]; }; struct compat_sigcontext { diff --git a/trunk/arch/powerpc/include/asm/compat.h b/trunk/arch/powerpc/include/asm/compat.h index 91010e8f8479..88e602f6430d 100644 --- a/trunk/arch/powerpc/include/asm/compat.h +++ b/trunk/arch/powerpc/include/asm/compat.h @@ -100,7 +100,8 @@ struct compat_statfs { compat_fsid_t f_fsid; int f_namelen; /* SunOS ignores this field. */ int f_frsize; - int f_spare[5]; + int f_flags; + int f_spare[4]; }; #define COMPAT_RLIM_OLD_INFINITY 0x7fffffff diff --git a/trunk/arch/s390/include/asm/compat.h b/trunk/arch/s390/include/asm/compat.h index da359ca6fe55..cdb9b78f6c08 100644 --- a/trunk/arch/s390/include/asm/compat.h +++ b/trunk/arch/s390/include/asm/compat.h @@ -131,7 +131,8 @@ struct compat_statfs { compat_fsid_t f_fsid; s32 f_namelen; s32 f_frsize; - s32 f_spare[6]; + s32 f_flags; + s32 f_spare[5]; }; #define COMPAT_RLIM_OLD_INFINITY 0x7fffffff diff --git a/trunk/arch/sparc/include/asm/compat.h b/trunk/arch/sparc/include/asm/compat.h index 6f57325bb883..b8be20d42a0a 100644 --- a/trunk/arch/sparc/include/asm/compat.h +++ b/trunk/arch/sparc/include/asm/compat.h @@ -134,7 +134,8 @@ struct compat_statfs { compat_fsid_t f_fsid; int f_namelen; /* SunOS ignores this field. */ int f_frsize; - int f_spare[5]; + int f_flags; + int f_spare[4]; }; #define COMPAT_RLIM_INFINITY 0x7fffffff diff --git a/trunk/arch/x86/include/asm/compat.h b/trunk/arch/x86/include/asm/compat.h index 1d9cd27c2920..30d737ef2a42 100644 --- a/trunk/arch/x86/include/asm/compat.h +++ b/trunk/arch/x86/include/asm/compat.h @@ -108,7 +108,8 @@ struct compat_statfs { compat_fsid_t f_fsid; int f_namelen; /* SunOS ignores this field. */ int f_frsize; - int f_spare[5]; + int f_flags; + int f_spare[4]; }; #define COMPAT_RLIM_OLD_INFINITY 0x7fffffff diff --git a/trunk/fs/compat.c b/trunk/fs/compat.c index 58b1da459893..0f1ab468fa2d 100644 --- a/trunk/fs/compat.c +++ b/trunk/fs/compat.c @@ -247,11 +247,8 @@ static int put_compat_statfs(struct compat_statfs __user *ubuf, struct kstatfs * __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(0, &ubuf->f_spare[0]) || - __put_user(0, &ubuf->f_spare[1]) || - __put_user(0, &ubuf->f_spare[2]) || - __put_user(0, &ubuf->f_spare[3]) || - __put_user(0, &ubuf->f_spare[4])) + __put_user(kbuf->f_flags, &ubuf->f_flags) || + __clear_user(ubuf->f_spare, sizeof(ubuf->f_spare))) return -EFAULT; return 0; }