Commit 7ac5db21 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre/llite: Update llite_lib.c with proper __user attributes

Casts for get/put_user and copy_to/from_user should have __user
attribute for the userspace buffer address.
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 55f37f01
...@@ -1744,14 +1744,14 @@ int ll_iocontrol(struct inode *inode, struct file *file, ...@@ -1744,14 +1744,14 @@ int ll_iocontrol(struct inode *inode, struct file *file,
ptlrpc_req_finished(req); ptlrpc_req_finished(req);
return put_user(flags, (int *)arg); return put_user(flags, (int __user *)arg);
} }
case FSFILT_IOC_SETFLAGS: { case FSFILT_IOC_SETFLAGS: {
struct lov_stripe_md *lsm; struct lov_stripe_md *lsm;
struct obd_info oinfo = { }; struct obd_info oinfo = { };
struct md_op_data *op_data; struct md_op_data *op_data;
if (get_user(flags, (int *)arg)) if (get_user(flags, (int __user *)arg))
return -EFAULT; return -EFAULT;
op_data = ll_prep_md_op_data(NULL, inode, NULL, NULL, 0, 0, op_data = ll_prep_md_op_data(NULL, inode, NULL, NULL, 0, 0,
...@@ -2219,8 +2219,8 @@ int ll_get_obd_name(struct inode *inode, unsigned int cmd, unsigned long arg) ...@@ -2219,8 +2219,8 @@ int ll_get_obd_name(struct inode *inode, unsigned int cmd, unsigned long arg)
if (!obd) if (!obd)
return -ENOENT; return -ENOENT;
if (copy_to_user((void *)arg, obd->obd_name, if (copy_to_user((void __user *)arg, obd->obd_name,
strlen(obd->obd_name) + 1)) strlen(obd->obd_name) + 1))
return -EFAULT; return -EFAULT;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment