mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 14:54:24 +00:00
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
facebb04a5
commit
2fae8f5aed
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157437
|
@ -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…
Reference in a new issue