Increment kdb_active after we stopped the other CPUs and decrement
kdb_active before we restart them. This avoids false positives on restarted CPUs when they test for kdb_active while kdb_trap() is still finishing up.
This commit is contained in:
parent
d6d31e0900
commit
39eb1d1263
@ -463,13 +463,13 @@ kdb_trap(int type, int code, struct trapframe *tf)
|
||||
|
||||
intr = intr_disable();
|
||||
|
||||
kdb_active++;
|
||||
|
||||
#ifdef SMP
|
||||
if ((did_stop_cpus = kdb_stop_cpus) != 0)
|
||||
stop_cpus(PCPU_GET(other_cpus));
|
||||
#endif
|
||||
|
||||
kdb_active++;
|
||||
|
||||
kdb_frame = tf;
|
||||
|
||||
/* Let MD code do its thing first... */
|
||||
@ -480,13 +480,13 @@ kdb_trap(int type, int code, struct trapframe *tf)
|
||||
|
||||
handled = kdb_dbbe->dbbe_trap(type, code);
|
||||
|
||||
kdb_active--;
|
||||
|
||||
#ifdef SMP
|
||||
if (did_stop_cpus)
|
||||
restart_cpus(stopped_cpus);
|
||||
#endif
|
||||
|
||||
kdb_active--;
|
||||
|
||||
intr_restore(intr);
|
||||
|
||||
return (handled);
|
||||
|
Loading…
Reference in New Issue
Block a user