mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 14:34:13 -04:00
staging: lustre: obdclass: return -EFAULT if copy_to_user() fails
We recently changed from using obd_ioctl_popdata() to calling
copy_to_user() directly. This if statement was supposed to be deleted
but it was over looked. "err" is zero at this point so it means we
return success.
Fixes: b03679f6a4 ("staging: lustre: uapi: remove obd_ioctl_popdata() wrapper")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9c8e28df44
commit
3ca121c2f4
@@ -262,7 +262,6 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
|
||||
dev);
|
||||
|
||||
if (copy_to_user((void __user *)arg, data, sizeof(*data)))
|
||||
if (err)
|
||||
err = -EFAULT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user