Commit 4cad6adc authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] Pad statvfs in compat layer

glibc assumes that the padding in statvfs() is zeroed. Do this
in the compat layer too for future safety.
parent a97d8d46
...@@ -120,7 +120,12 @@ static int put_compat_statfs(struct compat_statfs *ubuf, struct kstatfs *kbuf) ...@@ -120,7 +120,12 @@ static int put_compat_statfs(struct compat_statfs *ubuf, struct kstatfs *kbuf)
__put_user(kbuf->f_namelen, &ubuf->f_namelen) || __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[0], &ubuf->f_fsid.val[0]) ||
__put_user(kbuf->f_fsid.val[1], &ubuf->f_fsid.val[1]) || __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(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]))
return -EFAULT; return -EFAULT;
return 0; return 0;
} }
......
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