Skip to content

Commit

Permalink
compat: copy missing fields in compat_statfs64 to user
Browse files Browse the repository at this point in the history
f_flags and f_spare fields were not copied to userspace when
compat_sys_[f]statfs64 called.

Signed-off-by: Namhyung Kim <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
namhyung authored and Al Viro committed Jan 17, 2011
1 parent 974d879 commit e0bb6bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e0bb6bd

Please sign in to comment.