summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorups <ups@FreeBSD.org>2005-06-25 22:14:42 +0000
committerups <ups@FreeBSD.org>2005-06-25 22:14:42 +0000
commite8e35b1e1f4b6c4d2e263a183fdba5a556bf38fe (patch)
tree08bddcc8d33b6607555d925178478463ca79facd /sys/amd64
parentf185aed84fcc5a00b77518b88d9420ec16b2aa95 (diff)
downloadFreeBSD-src-e8e35b1e1f4b6c4d2e263a183fdba5a556bf38fe.zip
FreeBSD-src-e8e35b1e1f4b6c4d2e263a183fdba5a556bf38fe.tar.gz
Disable the interrupts in trap_fatal before calling kdb_trap.
(required now that critical sections no longer block interrupts) Reviewed by: jhb@ Approved by: re (scottl) Tested by: kris@,glebius@
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/trap.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 659ba92..98c1692 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -648,8 +648,15 @@ trap_fatal(frame, eva)
}
#ifdef KDB
- if ((debugger_on_panic || kdb_active) && kdb_trap(type, 0, frame))
- return;
+ if (debugger_on_panic || kdb_active) {
+ register_t rflags;
+ rflags = intr_disable();
+ if (kdb_trap(type, 0, frame)) {
+ intr_restore(rflags);
+ return;
+ }
+ intr_restore(rflags);
+ }
#endif
printf("trap number = %d\n", type);
if (type <= MAX_TRAP_MSG)
OpenPOWER on IntegriCloud