Replace critical_enter() and critical_exit() in kdb_trap() with
intr_disable() and intr_restore() resp. Previously, critical regions would have interrupts disabled, but that was changed. Consequently, the debugger could run with interrupts enabled. This could cause problems for the low-level console code where received characters would trigger an interrupt that causes the interrupt handler to read the character instead of the cngetc() function.
This commit is contained in:
parent
5980319eac
commit
64ac08d05f
@ -456,7 +456,7 @@ kdb_trap(int type, int code, struct trapframe *tf)
|
||||
#ifdef SMP
|
||||
int did_stop_cpus;
|
||||
#endif
|
||||
int handled;
|
||||
int handled, intr;
|
||||
|
||||
if (kdb_dbbe == NULL || kdb_dbbe->dbbe_trap == NULL)
|
||||
return (0);
|
||||
@ -465,7 +465,7 @@ kdb_trap(int type, int code, struct trapframe *tf)
|
||||
if (kdb_active)
|
||||
return (0);
|
||||
|
||||
critical_enter();
|
||||
intr = intr_disable();
|
||||
|
||||
kdb_active++;
|
||||
|
||||
@ -491,7 +491,7 @@ kdb_trap(int type, int code, struct trapframe *tf)
|
||||
|
||||
kdb_active--;
|
||||
|
||||
critical_exit();
|
||||
intr_restore(intr);
|
||||
|
||||
return (handled);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user