1
0
Fork 0

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

Fixes: 120e214e50 ("vfio: ccw: realize VFIO_DEVICE_G(S)ET_IRQ_INFO ioctls")
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
rM2-mainline
Eric Farman 2021-03-01 19:33:24 +01:00 committed by Heiko Carstens
parent db232eb42c
commit d9c48a948d
1 changed files with 1 additions and 1 deletions

View File

@ -582,7 +582,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:
{