diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2016-01-03 12:05:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-03 14:27:25 -0800 |
commit | e3e8ff41c0ffe579ea48bd3250bc23abc4bd4b37 (patch) | |
tree | 7f1970e7fcfc5da5ccbb671665a8093e6eb26f11 /drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | |
parent | staging/lustre: Update user pointers in struct obd_ioctl_data (diff) | |
download | linux-dev-e3e8ff41c0ffe579ea48bd3250bc23abc4bd4b37.tar.xz linux-dev-e3e8ff41c0ffe579ea48bd3250bc23abc4bd4b37.zip |
staging/lustre: Mark obd_ioctl_popdata/getdata argument as __user
arg is a userspace pointer and marking it as such makes sparse happy.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/obdclass/linux/linux-module.c')
-rw-r--r-- | drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c index a055cbb4f162..f8d3a639e85c 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c @@ -74,14 +74,14 @@ #include "../../include/lustre/lustre_build_version.h" /* buffer MUST be at least the size of obd_ioctl_hdr */ -int obd_ioctl_getdata(char **buf, int *len, void *arg) +int obd_ioctl_getdata(char **buf, int *len, void __user *arg) { struct obd_ioctl_hdr hdr; struct obd_ioctl_data *data; int err; int offset = 0; - if (copy_from_user(&hdr, (void *)arg, sizeof(hdr))) + if (copy_from_user(&hdr, arg, sizeof(hdr))) return -EFAULT; if (hdr.ioc_version != OBD_IOCTL_VERSION) { @@ -114,7 +114,7 @@ int obd_ioctl_getdata(char **buf, int *len, void *arg) *len = hdr.ioc_len; data = (struct obd_ioctl_data *)*buf; - if (copy_from_user(*buf, (void *)arg, hdr.ioc_len)) { + if (copy_from_user(*buf, arg, hdr.ioc_len)) { err = -EFAULT; goto free_buf; } @@ -156,7 +156,7 @@ free_buf: } EXPORT_SYMBOL(obd_ioctl_getdata); -int obd_ioctl_popdata(void *arg, void *data, int len) +int obd_ioctl_popdata(void __user *arg, void *data, int len) { int err; |