Commit 7659751a authored by David S. Miller's avatar David S. Miller

[COMPAT]: Fix arguments to compat statfs64 syscalls, 'sz' was missing.

parent c85d8ef9
...@@ -169,7 +169,6 @@ asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs *buf) ...@@ -169,7 +169,6 @@ asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs *buf)
static int put_compat_statfs64(struct compat_statfs64 *ubuf, struct kstatfs *kbuf) static int put_compat_statfs64(struct compat_statfs64 *ubuf, struct kstatfs *kbuf)
{ {
if (sizeof ubuf->f_blocks == 4) { if (sizeof ubuf->f_blocks == 4) {
if ((kbuf->f_blocks | kbuf->f_bfree | if ((kbuf->f_blocks | kbuf->f_bfree |
kbuf->f_bavail | kbuf->f_files | kbuf->f_ffree) & kbuf->f_bavail | kbuf->f_files | kbuf->f_ffree) &
...@@ -192,11 +191,14 @@ static int put_compat_statfs64(struct compat_statfs64 *ubuf, struct kstatfs *kbu ...@@ -192,11 +191,14 @@ static int put_compat_statfs64(struct compat_statfs64 *ubuf, struct kstatfs *kbu
return 0; return 0;
} }
asmlinkage long compat_statfs64(const char *path, struct compat_statfs64 *buf) asmlinkage long compat_statfs64(const char *path, compat_size_t sz, struct compat_statfs64 *buf)
{ {
struct nameidata nd; struct nameidata nd;
int error; int error;
if (sz != sizeof(*buf))
return -EINVAL;
error = user_path_walk(path, &nd); error = user_path_walk(path, &nd);
if (!error) { if (!error) {
struct kstatfs tmp; struct kstatfs tmp;
...@@ -208,12 +210,15 @@ asmlinkage long compat_statfs64(const char *path, struct compat_statfs64 *buf) ...@@ -208,12 +210,15 @@ asmlinkage long compat_statfs64(const char *path, struct compat_statfs64 *buf)
return error; return error;
} }
asmlinkage long compat_fstatfs64(unsigned int fd, struct compat_statfs64 *buf) asmlinkage long compat_fstatfs64(unsigned int fd, compat_size_t sz, struct compat_statfs64 *buf)
{ {
struct file * file; struct file * file;
struct kstatfs tmp; struct kstatfs tmp;
int error; int error;
if (sz != sizeof(*buf))
return -EINVAL;
error = -EBADF; error = -EBADF;
file = fget(fd); file = fget(fd);
if (!file) if (!file)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment