aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLiu Hua <sdu.liu@huawei.com>2014-03-27 01:56:18 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-04-07 07:10:00 -0400
commit8fad87bca7ac9737e413ba5f1656f1114a8c314d (patch)
tree5962461250dbb421d380b0486697486bbe4b57cf /arch
parentc7d442f46c1bb18e48204f41c3d838c475eb5130 (diff)
ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr
When we configure CONFIG_ARM_LPAE=y, pfn << PAGE_SHIFT will overflow if pfn >= 0x100000 in copy_oldmem_page. So use __pfn_to_phys for converting. Signed-off-by: Liu Hua <sdu.liu@huawei.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/crash_dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/crash_dump.c b/arch/arm/kernel/crash_dump.c
index 90c50d4b43f7..5d1286d51154 100644
--- a/arch/arm/kernel/crash_dump.c
+++ b/arch/arm/kernel/crash_dump.c
@@ -39,7 +39,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
39 if (!csize) 39 if (!csize)
40 return 0; 40 return 0;
41 41
42 vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE); 42 vaddr = ioremap(__pfn_to_phys(pfn), PAGE_SIZE);
43 if (!vaddr) 43 if (!vaddr)
44 return -ENOMEM; 44 return -ENOMEM;
45 45