This allows kdb to debug a crash with in the kms code with a
single level recursive re-entry.
Signed-off-by: Jason Wessel <jason.wessel at windriver.com>
---
kernel/debug/debug_core.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
index e44e693..e6c6f8a 100644
--- a/kernel/debug/debug_core.c
+++ b/kernel/debug/debug_core.c
@@ -443,6 +443,10 @@ static int kgdb_reenter_check(struct kgdb_state *ks)
}
printk(KERN_CRIT "KGDB: re-enter exception: ALL breakpoints killed\n");
+#ifdef CONFIG_KGDB_KDB
+ /* Allow kdb to debug itself one level */
+ return 0;
+#endif
dump_stack();
panic("Recursive entry to debugger");
@@ -487,6 +491,9 @@ acquirelock:
smp_wmb();
atomic_set(&cpu_in_kgdb[cpu], 1);
+ if (exception_level == 1)
+ goto cpu_master_loop;
+
/*
* CPU will loop if it is a slave or request to become a kgdb
* master cpu and acquire the kgdb_active lock:
--
1.6.4.rc1
- References:
- [PATCH 0/37] kgdb, kdb and atomic kernel modesetting series
- [PATCH 01/37] softlockup: add sched_clock_tick() to avoid kernel warning on kgdb resume
- [PATCH 02/37] x86, hw_breakpoint, kgdb: kgdb to use hw_breakpoint API
- [PATCH 03/37] Move kernel/kgdb.c to kernel/debug/debug_core.c
- [PATCH 04/37] Separate the gdbstub from the debug core
- [PATCH 05/37] kdb: core for kgdb back end
- [PATCH 06/37] kgdb: eliminate kgdb_wait(), all cpus enter the same way
- [PATCH 07/37] kgdb,sparc: Add in kgdb_arch_set_pc for sparc
- [PATCH 08/37] kgdb, sh: update superh kgdb exception handling
- [PATCH 09/37] kgdb, blackfin: Add in kgdb_arch_set_pc for blackfin
- [PATCH 10/37] kgdb: Make mem access function weak in kgdb.c and kgdb.h
- [PATCH 11/37] kgdb: Fix kernel-doc format error in kgdb.h
- [PATCH 12/37] kgdb: core changes to support kdb
- [PATCH 13/37] kgdb, 8250, pl011: Return immediately from console poll
- [PATCH 14/37] sh, sh-sci: Use NO_POLL_CHAR in the SCIF polled console code
- [PATCH 15/37] sparc, sunzilog: Add console polling support for sunzilog serial driver
- [PATCH 16/37] kgdb: gdb "monitor" -> kdb passthrough
- [PATCH 17/37] kgdboc, keyboard: Keyboard driver for kdb with kgdb
- [PATCH 18/37] kgdb: remove post_primary_code references
- [PATCH 19/37] x86,kgdb: Add low level debug hook
- [PATCH 20/37] arm, kgdb: Add hook to catch an oops with debugger
- [PATCH 21/37] powerpc, kgdb: Introduce low level trap catching
- [PATCH 22/37] mips, kgdb: kdb low level trap catch and stack trace
- [PATCH 23/37] kgdb: Add the ability to schedule a breakpoint via a tasklet
- [PATCH 24/37] kgdboc, kdb: Allow kdb to work on a non open console port
- [PATCH 25/37] printk, kdb: capture printk() when in kdb shell
- [PATCH 26/37] keyboard, input: Add hook to input to allow low level event clear
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]