staging/lustre: Properly mark argument to p_ioctl in cfs_psdev_ops as __user

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>
This commit is contained in:
Oleg Drokin 2016-01-03 12:05:44 -05:00 committed by Greg Kroah-Hartman
parent e09bee346e
commit f2938c04b8
2 changed files with 2 additions and 2 deletions

View 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 *);
};
/*

View 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;