summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lnet/libcfs
diff options
context:
space:
mode:
authorOleg Drokin <green@linuxhacker.ru>2016-03-27 16:05:03 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-29 19:08:45 (GMT)
commit78ab125e63115a7f42d598a2113cd75092a40335 (patch)
tree1cfb6bd48631a301815ce79f84dbc54f958d0f54 /drivers/staging/lustre/lnet/libcfs
parent1bc55f796a9872208e19b57fd00f4c484be35318 (diff)
downloadlinux-78ab125e63115a7f42d598a2113cd75092a40335.tar.xz
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: Oleg Drokin <green@linuxhacker.ru> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/libcfs')
-rw-r--r--drivers/staging/lustre/lnet/libcfs/linux/linux-module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
index b86e937..d89f71e 100644
--- a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
+++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
@@ -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 &&