Commit 6d90634076200af035f1d9dcc8fc11acefd603e9

Authored by Jason Wessel
1 parent d37d39ae3b

debug_core,kdb: Allow the debug core to process a recursive debug entry

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@windriver.com>

Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff

kernel/debug/debug_core.c
... ... @@ -445,6 +445,10 @@
445 445 }
446 446  
447 447 printk(KERN_CRIT "KGDB: re-enter exception: ALL breakpoints killed\n");
  448 +#ifdef CONFIG_KGDB_KDB
  449 + /* Allow kdb to debug itself one level */
  450 + return 0;
  451 +#endif
448 452 dump_stack();
449 453 panic("Recursive entry to debugger");
450 454  
... ... @@ -488,6 +492,9 @@
488 492 * our cpu_in_kgdb[] flag setting does:
489 493 */
490 494 atomic_inc(&cpu_in_kgdb[cpu]);
  495 +
  496 + if (exception_level == 1)
  497 + goto cpu_master_loop;
491 498  
492 499 /*
493 500 * CPU will loop if it is a slave or request to become a kgdb