arm: mm: Add VM_ARM_EMPTY_MAPPING flag to mark the PMD gaps
ioremap optimization to return the addresses from the static mapping if already present added the feature to add the pmd empty gaps into the VM area but don't map such gaps in this commit "19b52abe". This introduces the problem when the pfn is 0x0 and ends up into the empty section gap found by the fill_pmd_gaps. If the driver calls the ioremap(0, PAGE_SIZE) then it will return the address which is never mapped, and access to that address will result in the crash. To resolve this mark the empty PMD gaps with new flag VM_ARM_EMPTY_MAPPING instead of the VM_ARM_STATIC_MAPPING, so that ioremap only checks the VM_ARM_STATIC_MAPPING flag and skips over the VM_ARM_EMPTY_MAPPING sections. CRs-Fixed: 385828 Change-Id: I71e053f05abd2f611a6f17e7c86635404c31751e Signed-off-by:Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by:
Trilok Soni <tsoni@codeaurora.org>
Loading
Please sign in to comment