• Jake Moilanen's avatar
    [PATCH] powerpc: IOMMU SG paranoia · a958a264
    Jake Moilanen authored
    This addresses two items, which are unlikely to be hit if we
    trust drivers.
    
    The first is moving a memory barrier below where the vmerged SG count
    is passed back, but before the list is set to end.  If those
    instructions were reordered, there could be an issue in iommu_unmap_sg().
    
    The second is making sure we terminate the list on the failure case of
    iommu_map_sg().  If a driver does not look at the failure return code,
    it could pass a ill-formed SG list to iommu_unmap_sg().
    Signed-off-by: default avatarJake Moilanen <moilanen@austin.ibm.com>
    Acked-by: default avatarOlof Johansson <olof@lixom.net>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    a958a264
iommu.c 14.7 KB