[PATCH 1/2] dma-mapping: remove bogus test for pfn_valid from dma_map_resource

David Hildenbrand david at redhat.com
Thu Sep 30 00:27:03 PDT 2021


On 30.09.21 03:30, Mike Rapoport wrote:
> From: Mike Rapoport <rppt at linux.ibm.com>
> 
> dma_map_resource() uses pfn_valid() to ensure the range is not RAM.
> However, pfn_valid() only checks for availability of the memory map for a
> PFN but it does not ensure that the PFN is actually backed by RAM.
> 
> As dma_map_resource() is the only method in DMA mapping APIs that has this
> check, simply drop the pfn_valid() test from dma_map_resource().
> 
> Link: https://lore.kernel.org/all/20210824173741.GC623@arm.com/
> Signed-off-by: Mike Rapoport <rppt at linux.ibm.com>
> ---

Acked-by: David Hildenbrand <david at redhat.com>

-- 
Thanks,

David / dhildenb




More information about the linux-arm-kernel mailing list