diff options
author | Liu Hua <sdu.liu@huawei.com> | 2014-03-27 06:56:18 +0100 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-06-09 15:53:18 +0200 |
commit | c9d4313b44df42f7f67d4edda7c0498eee87ed05 (patch) | |
tree | f4ade0971b9ddd6bb377dacb9e8537106b1744f0 /arch | |
parent | 6828a5f3d4c385147d5228ae7b563222d3780798 (diff) |
ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr
commit 8fad87bca7ac9737e413ba5f1656f1114a8c314d upstream.
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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/crash_dump.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/crash_dump.c b/arch/arm/kernel/crash_dump.c index 90c50d4b43f..5d1286d5115 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, if (!csize) return 0; - vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE); + vaddr = ioremap(__pfn_to_phys(pfn), PAGE_SIZE); if (!vaddr) return -ENOMEM; |