mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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>
This commit is contained in:
committed by
Heiko Carstens
parent
db232eb42c
commit
d9c48a948d
@@ -582,7 +582,7 @@ static ssize_t vfio_ccw_mdev_ioctl(struct mdev_device *mdev,
|
|||||||
if (info.count == -1)
|
if (info.count == -1)
|
||||||
return -EINVAL;
|
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:
|
case VFIO_DEVICE_SET_IRQS:
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user