Unverified Commit 3e25d5a4 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Arnd Bergmann
Browse files

asm-generic: add an optional pfn_valid check to page_to_phys



page_to_pfn is usually implemented by pointer arithmetics on the memory
map, which means that bogus input can lead to even more bogus output.

Powerpc had a pfn_valid check on the intermediate pfn in the page_to_phys
implementation when CONFIG_DEBUG_VIRTUAL is defined, which seems
generally useful, so add that to the generic version.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent c5c3238d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment