ARM: 6052/1: kdump: make kexec work in interrupt context

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, April 19, 2010 - 8:59 am

Gitweb:     http://git.kernel.org/linus/3f2d4f561fab4588344cc519fd323382ab950928
Commit:     3f2d4f561fab4588344cc519fd323382ab950928
Parent:     82c6f5a5b3e91ef4d2fb8725de4b8cf7affd4d61
Author:     Mika Westerberg <mika.westerberg@iki.fi>
AuthorDate: Tue Apr 13 07:01:46 2010 +0100
Committer:  Russell King <rmk+kernel@arm.linux.org.uk>
CommitDate: Wed Apr 14 11:11:31 2010 +0100

    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 <ext-mika.1.westerberg@nokia.com>
    Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mm/mmu.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 4223d08..241c24a 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -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())
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ARM: 6052/1: kdump: make kexec work in interrupt context, Linux Kernel Mailing ..., (Mon Apr 19, 8:59 am)