Commit f2938c04 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman
Browse files

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: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e09bee34
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 *);
};

/*
+1 −1
Original line number Diff line number Diff line
@@ -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;