diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-14 16:47:47 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-14 16:47:47 -0800 |
commit | e0ca3826b147a7ada526856af25a87c8ffad489f (patch) | |
tree | 73757e7ac21c00f3ef19ba29d03bd213ea12873a /drivers/vfio/vfio_iommu_type1.c | |
parent | 2cd83ba5bede2f72cc6c79a19a1bddf576b50e88 (diff) | |
parent | f3199673e6eb29e14af45b6074a7df277f14a850 (diff) | |
download | linux-e0ca3826b147a7ada526856af25a87c8ffad489f.tar.bz2 |
Merge tag 'vfio-v4.15-rc1' of git://github.com/awilliam/linux-vfio
Pull VFIO updates from Alex Williamson:
- Virtualize PCI MPS and MRRS registers
- Avoid soft lockups on SPAPR when clearing TCE
- Broadcom FlexRM platform device support
- Samples driver cleanup & type1 integer overflow fix
* tag 'vfio-v4.15-rc1' of git://github.com/awilliam/linux-vfio:
vfio: platform: reset: Add Broadcom FlexRM reset module
vfio/type1: silence integer overflow warning
vfio-mdev/samples: make mdev_fops const and static
vfio/spapr: Add cond_resched() for huge updates
vfio/pci: Virtualize Maximum Read Request Size
vfio/pci: Virtualize Maximum Payload Size
Diffstat (limited to 'drivers/vfio/vfio_iommu_type1.c')
-rw-r--r-- | drivers/vfio/vfio_iommu_type1.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 92155cce926d..e30e29ae4819 100644 --- a/drivers/vfio/vfio_iommu_type1.c +++ b/drivers/vfio/vfio_iommu_type1.c @@ -767,6 +767,9 @@ static int vfio_dma_do_unmap(struct vfio_iommu *iommu, return -EINVAL; if (!unmap->size || unmap->size & mask) return -EINVAL; + if (unmap->iova + unmap->size < unmap->iova || + unmap->size > SIZE_MAX) + return -EINVAL; WARN_ON(mask & PAGE_MASK); again: |