mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-29 13:57:44 +09:00
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@linux.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20210930013039.11260-2-rppt@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Bug: 228454859
(cherry picked from commit a9c38c5d26)
Change-Id: Iae9d77b018d728a0cfaf5f4fd7e14311aa463659
Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>