From: M. Vefa Bicakci Date: Sun, 28 Feb 2016 14:26:22 +0000 (-0500) Subject: staging: lustre: Use __user for a pointer to a user space address X-Git-Tag: v4.6-rc1~103^2~364 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c0611e3e9af40a87b2cad5188f4c05417772aa62;p=platform%2Fkernel%2Flinux-exynos.git staging: lustre: Use __user for a pointer to a user space address This commit corrects two sparse warnings caused by the lack of a __user annotation for the third argument of the libcfs_ioctl_handle function. module.c:165:68: warning: incorrect type in argument 1 (different address spaces) module.c:165:68: expected void [noderef] *arg module.c:165:68: got void *arg module.c:209:47: warning: incorrect type in argument 3 (different address spaces) module.c:209:47: expected void *arg module.c:209:47: got void [noderef] *arg The need to have the __user annotation is supported by the fact that libcfs_ioctl_handle passes its third argument to a helper function (libcfs_ioctl_popdata) which also has a __user annotation for its corresponding argument. Signed-off-by: M. Vefa Bicakci Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c index 5d52673..2a62331 100644 --- a/drivers/staging/lustre/lustre/libcfs/module.c +++ b/drivers/staging/lustre/lustre/libcfs/module.c @@ -116,7 +116,7 @@ int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand) EXPORT_SYMBOL(libcfs_deregister_ioctl); static int libcfs_ioctl_handle(struct cfs_psdev_file *pfile, unsigned long cmd, - void *arg, struct libcfs_ioctl_hdr *hdr) + void __user *arg, struct libcfs_ioctl_hdr *hdr) { struct libcfs_ioctl_data *data = NULL; int err = -EINVAL;