summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorAntonios Motakis <a.motakis@virtualopensystems.com>2013-10-11 16:40:46 (GMT)
committerAlex Williamson <alex.williamson@redhat.com>2013-10-11 16:40:46 (GMT)
commitd93b3ac0edb85b1c1e8fe0a065c1e5045783e2f6 (patch)
tree0b3d9b1b3c463f7d0e89f041c1783d7ea13d3a1c /drivers/mmc
parentd0e639c9e06d44e713170031fe05fb60ebe680af (diff)
downloadlinux-fsl-qoriq-d93b3ac0edb85b1c1e8fe0a065c1e5045783e2f6.tar.xz
VFIO: vfio_iommu_type1: fix bug caused by break in nested loop
In vfio_iommu_type1.c there is a bug in vfio_dma_do_map, when checking that pages are not already mapped. Since the check is being done in a for loop nested within the main loop, breaking out of it does not create the intended behavior. If the underlying IOMMU driver returns a non-NULL value, this will be ignored and mapping the DMA range will be attempted anyway, leading to unpredictable behavior. This interracts badly with the ARM SMMU driver issue fixed in the patch that was submitted with the title: "[PATCH 2/2] ARM: SMMU: return NULL on error in arm_smmu_iova_to_phys" Both fixes are required in order to use the vfio_iommu_type1 driver with an ARM SMMU. This patch refactors the function slightly, in order to also make this kind of bug less likely. Signed-off-by: Antonios Motakis <a.motakis@virtualopensystems.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/mmc')
0 files changed, 0 insertions, 0 deletions