x86: avoid early crash in disable_local_APIC()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, January 26, 2009 - 12:00 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4a13ad...
Commit:     4a13ad0bd8869bb491c67918662f9b1852595af5
Parent:     5cca0cf15a94417f49625ce52e23589eed0a1675
Author:     Jan Beulich <jbeulich@novell.com>
AuthorDate: Wed Jan 14 12:28:51 2009 +0000
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu Jan 15 23:48:19 2009 +0100

    x86: avoid early crash in disable_local_APIC()
    
    E.g. when called due to an early panic.
    
    Signed-off-by: Jan Beulich <jbeulich@novell.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/apic.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index 0f830e4..d19aa3a 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -895,6 +895,10 @@ void disable_local_APIC(void)
 {
 	unsigned int value;
 
+	/* APIC hasn't been mapped yet */
+	if (!apic_phys)
+		return;
+
 	clear_local_APIC();
 
 	/*
--
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:
x86: avoid early crash in disable_local_APIC(), Linux Kernel Mailing ..., (Mon Jan 26, 12:00 pm)