diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-03-18 12:02:41 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-03-18 12:02:41 +0800 |
commit | 5cc3b58828a8bb2ebb34de96d1aec1564f912a31 (patch) | |
tree | 2694db57173168b3a222c25c3372cdef0b17924f /drivers/vfio/vfio_iommu_type1.c | |
parent | c24745baffdb7143d6f345659fb6d781b070ca50 (diff) | |
parent | 7f30737678023b5becaf0e2e012665f71b886a7d (diff) |
Merge tag 'v4.1.20' into linux-linaro-lsk-v4.1lsk-v4.1-16.03
This is the 4.1.20 stable release
Diffstat (limited to 'drivers/vfio/vfio_iommu_type1.c')
-rw-r--r-- | drivers/vfio/vfio_iommu_type1.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 57d8c37a002b..092216540756 100644 --- a/drivers/vfio/vfio_iommu_type1.c +++ b/drivers/vfio/vfio_iommu_type1.c @@ -986,7 +986,8 @@ static long vfio_iommu_type1_ioctl(void *iommu_data, info.iova_pgsizes = vfio_pgsize_bitmap(iommu); - return copy_to_user((void __user *)arg, &info, minsz); + return copy_to_user((void __user *)arg, &info, minsz) ? + -EFAULT : 0; } else if (cmd == VFIO_IOMMU_MAP_DMA) { struct vfio_iommu_type1_dma_map map; @@ -1019,7 +1020,8 @@ static long vfio_iommu_type1_ioctl(void *iommu_data, if (ret) return ret; - return copy_to_user((void __user *)arg, &unmap, minsz); + return copy_to_user((void __user *)arg, &unmap, minsz) ? + -EFAULT : 0; } return -ENOTTY; |