]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
arm64: mm: dma-mapping: fix __iommu_alloc_atomic()
authorJC Kuo <jckuo@nvidia.com>
Tue, 5 May 2015 13:24:59 +0000 (21:24 +0800)
committerKrishna Reddy <vdumpa@nvidia.com>
Thu, 7 May 2015 16:47:03 +0000 (09:47 -0700)
commit245497819e5805d7c1e2df3eee1bfd25be8fa9ff
treeaf7285aeb2d0a46436761eb1378d36425c33a542
parentb86ebeaf6c89e7ee79272f876e456ea0428975f9
arm64: mm: dma-mapping: fix __iommu_alloc_atomic()

__iommu_alloc_atomic() by accident passes a "struct page **pages" pointer
where the pointed memory contains only one valid "struct page *page" to
__iommu_create_mapping(). This ends up with mapping failure at the second
page in ___iommu_create_mapping()->iommu_map().

This commit fixes the issue by calling __iommu_get_pages() in
__iommu_alloc_atomic() to retrieve valid "struct page **pages" pointer from
&atomic_pool->pages[].

bug 200102712

Change-Id: Iae1796b505c4ea66f5a77463f5a49bc0e72a1424
Signed-off-by: JC Kuo <jckuo@nvidia.com>
Reviewed-on: http://git-master/r/739101
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
arch/arm64/mm/dma-mapping.c