]> git.baikalelectronics.ru Git - kernel.git/commit
x86/amd-iommu: Fix rounding-bug in __unmap_single
authorJoerg Roedel <joerg.roedel@amd.com>
Thu, 23 Sep 2010 14:12:48 +0000 (16:12 +0200)
committerJoerg Roedel <joerg.roedel@amd.com>
Thu, 23 Sep 2010 14:26:20 +0000 (16:26 +0200)
commita0ceb0ed48b022e1cf492af6dbff194f4e1d8467
tree73a74dfb1575e9a7f255bcd6fcc84bcdb25f0e5f
parent9baf8b9a631e3f03afb79bd2fb0f06cf1944139d
x86/amd-iommu: Fix rounding-bug in __unmap_single

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: Joerg Roedel <joerg.roedel@amd.com>
arch/x86/kernel/amd_iommu.c