Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 72ba965b authored by Eric Farman's avatar Eric Farman Committed by Greg Kroah-Hartman
Browse files

s390/cio: return -EFAULT if copy_to_user() fails

commit d9c48a94 upstream.

Fixes: 120e214e

 ("vfio: ccw: realize VFIO_DEVICE_G(S)ET_IRQ_INFO ioctls")
Signed-off-by: default avatarEric Farman <farman@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d2100ef3
Branches
Tags
No related merge requests found
......@@ -545,7 +545,7 @@ static ssize_t vfio_ccw_mdev_ioctl(struct mdev_device *mdev,
if (info.count == -1)
return -EINVAL;
return copy_to_user((void __user *)arg, &info, minsz);
return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0;
}
case VFIO_DEVICE_SET_IRQS:
{
......
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