ARM: 6052/1: kdump: make kexec work in interrupt context
authorMika Westerberg <mika.westerberg@iki.fi>
Tue, 13 Apr 2010 06:01:46 +0000 (07:01 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 14 Apr 2010 10:11:31 +0000 (11:11 +0100)
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 <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/mmu.c

index 4223d086aa1768c22f56085c59fb1a73cfb0f5ab..241c24a1c18f391b6795612786ef6139213b7cbf 100644 (file)
@@ -1054,10 +1054,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())