diff options
author | marcel <marcel@FreeBSD.org> | 2006-04-04 00:40:20 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2006-04-04 00:40:20 +0000 |
commit | dde58fbc0d5b9f049e2348a5b203b5f6763d096c (patch) | |
tree | 6382093f73f725bb387480331179b19611c9e804 /sys/kern/subr_kdb.c | |
parent | d28296b1997414783d48aaa593aa4c5ddc5dadb8 (diff) | |
download | FreeBSD-src-dde58fbc0d5b9f049e2348a5b203b5f6763d096c.zip FreeBSD-src-dde58fbc0d5b9f049e2348a5b203b5f6763d096c.tar.gz |
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.
Diffstat (limited to 'sys/kern/subr_kdb.c')
-rw-r--r-- | sys/kern/subr_kdb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index 7fb9b9e..e7b9a73 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -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); |