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)
static int put_compat_statfs64(struct compat_statfs64 *ubuf, struct kstatfs *kbuf)
{
if (sizeof ubuf->f_blocks == 4) {
if ((kbuf->f_blocks | kbuf->f_bfree |
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
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;
int error;
if (sz != sizeof(*buf))
return -EINVAL;
error = user_path_walk(path, &nd);
if (!error) {
struct kstatfs tmp;
......@@ -208,12 +210,15 @@ asmlinkage long compat_statfs64(const char *path, struct compat_statfs64 *buf)
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 kstatfs tmp;
int error;
if (sz != sizeof(*buf))
return -EINVAL;
error = -EBADF;
file = fget(fd);
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