mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
s390/cio: return -EFAULT if copy_to_user() fails
commitd9c48a948dupstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d7b8aef5b6
commit
dac4e0e10b
|
|
@ -578,7 +578,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