From: Mika Westerberg Date: Tue, 13 Apr 2010 06:01:46 +0000 (+0100) Subject: ARM: 6052/1: kdump: make kexec work in interrupt context X-Git-Tag: firefly_0821_release~10292 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4d473cae1c0768d01a31580510d8729d983c2b8c;p=firefly-linux-kernel-4.4.55.git ARM: 6052/1: kdump: make kexec work in interrupt context When crash happens in interrupt context there is no userspace context. We always use current->active_mm in those cases. Signed-off-by: Mika Westerberg Signed-off-by: Russell King --- diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index ea67be0223ac..c2f22eaa388e 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1050,10 +1050,12 @@ void setup_mm_for_reboot(char mode) pgd_t *pgd; int i; - if (current->mm && current->mm->pgd) - pgd = current->mm->pgd; - else - pgd = init_mm.pgd; + /* + * We need to access to user-mode page tables here. For kernel threads + * we don't have any user-mode mappings so we use the context that we + * "borrowed". + */ + pgd = current->active_mm->pgd; base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale())