mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:02:20 +00: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:
parent
db232eb42c
commit
d9c48a948d
@ -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:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user