]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
staging/lustre: Properly mark argument to p_ioctl in cfs_psdev_ops as __user
authorOleg Drokin <green@linuxhacker.ru>
Sun, 3 Jan 2016 17:05:44 +0000 (12:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2016 22:32:36 +0000 (14:32 -0800)
This also silents a sparse address space warning

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs.h
drivers/staging/lustre/lustre/libcfs/linux/linux-module.c

index 094eb0f279542f191f4482966c45a5ef6ede39fc..dc9b88f2f9779a98c0545ac7219a5501cdf23ae8 100644 (file)
@@ -77,7 +77,7 @@ struct cfs_psdev_ops {
        int (*p_close)(unsigned long, void *);
        int (*p_read)(struct cfs_psdev_file *, char *, unsigned long);
        int (*p_write)(struct cfs_psdev_file *, char *, unsigned long);
-       int (*p_ioctl)(struct cfs_psdev_file *, unsigned long, void *);
+       int (*p_ioctl)(struct cfs_psdev_file *, unsigned long, void __user *);
 };
 
 /*
index c089b044ef2eab81e567e47bf4956aef517c6f75..e5bc3d349d782b7a83346f7206363972af50c4aa 100644 (file)
@@ -151,7 +151,7 @@ static long libcfs_ioctl(struct file *file,
        }
 
        if (libcfs_psdev_ops.p_ioctl != NULL)
-               rc = libcfs_psdev_ops.p_ioctl(&pfile, cmd, (void *)arg);
+               rc = libcfs_psdev_ops.p_ioctl(&pfile, cmd, (void __user *)arg);
        else
                rc = -EPERM;
        return rc;