Commit 78ab125e authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre/libcfs: Copy correct amount in libcfs_ioctl_getdata

Commit b8ff756bc351 ("staging: lustre: libcfs: merge code from
libcfs_ioctl into libcfs_ioctl_getdata") introduced a problem
copying just a single pointer worth of data from userspace
instead of whole libcfs_ioctl_hdr structure.
Adjust the copying amount.
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Acked-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1bc55f79
......@@ -128,7 +128,7 @@ int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp,
struct libcfs_ioctl_hdr hdr;
int err = 0;
if (copy_from_user(&hdr, uhdr, sizeof(uhdr)))
if (copy_from_user(&hdr, uhdr, sizeof(hdr)))
return -EFAULT;
if (hdr.ioc_version != LIBCFS_IOCTL_VERSION &&
......
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