• Joerg Roedel's avatar
    x86/amd-iommu: Fix rounding-bug in __unmap_single · 04e0463e
    Joerg Roedel authored
    In the __unmap_single function the dma_addr is rounded down
    to a page boundary before the dma pages are unmapped. The
    address is later also used to flush the TLB entries for that
    mapping. But without the offset into the dma page the amount
    of pages to flush might be miscalculated in the TLB flushing
    path. This patch fixes this bug by using the original
    address to flush the TLB.
    
    Cc: stable@kernel.org
    Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
    04e0463e
amd_iommu.c 60.3 KB