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: Oleg Drokin <[email protected]>
Acked-by: James Simmons <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 &&