summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-02-08 00:10:07 +0000
committerjhb <jhb@FreeBSD.org>2001-02-08 00:10:07 +0000
commit269b51d4a035539f2f63332131bc9e7ba169c110 (patch)
tree7b33e01e50e9619befc7f63e6c32caee089e9a8a /sys
parentec3d644900bc30c5fc47544ac6deea885817780b (diff)
downloadFreeBSD-src-269b51d4a035539f2f63332131bc9e7ba169c110.zip
FreeBSD-src-269b51d4a035539f2f63332131bc9e7ba169c110.tar.gz
Don't enable interrupts for a kernel breakpoint or trace trap. Otherwise,
this negates the explicit disabling of interrupts when entering the debugger in Debugger().
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/trap.c13
-rw-r--r--sys/i386/i386/trap.c13
-rw-r--r--sys/kern/subr_trap.c13
3 files changed, 21 insertions, 18 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 40681bd..b4373b3 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -254,18 +254,19 @@ trap(frame)
printf(
"pid %ld (%s): trap %d with interrupts disabled\n",
(long)curproc->p_pid, curproc->p_comm, type);
- else if (type != T_BPTFLT && type != T_TRCTRAP)
+ else if (type != T_BPTFLT && type != T_TRCTRAP) {
/*
* XXX not quite right, since this may be for a
* multiple fault in user mode.
*/
printf("kernel trap %d with interrupts disabled\n",
type);
- /*
- * We should walk p_heldmtx here and see if any are
- * spin mutexes, and not do this if so.
- */
- enable_intr();
+ /*
+ * We should walk p_heldmtx here and see if any are
+ * spin mutexes, and not do this if so.
+ */
+ enable_intr();
+ }
}
eva = 0;
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c
index 40681bd..b4373b3 100644
--- a/sys/i386/i386/trap.c
+++ b/sys/i386/i386/trap.c
@@ -254,18 +254,19 @@ trap(frame)
printf(
"pid %ld (%s): trap %d with interrupts disabled\n",
(long)curproc->p_pid, curproc->p_comm, type);
- else if (type != T_BPTFLT && type != T_TRCTRAP)
+ else if (type != T_BPTFLT && type != T_TRCTRAP) {
/*
* XXX not quite right, since this may be for a
* multiple fault in user mode.
*/
printf("kernel trap %d with interrupts disabled\n",
type);
- /*
- * We should walk p_heldmtx here and see if any are
- * spin mutexes, and not do this if so.
- */
- enable_intr();
+ /*
+ * We should walk p_heldmtx here and see if any are
+ * spin mutexes, and not do this if so.
+ */
+ enable_intr();
+ }
}
eva = 0;
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index 40681bd..b4373b3 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -254,18 +254,19 @@ trap(frame)
printf(
"pid %ld (%s): trap %d with interrupts disabled\n",
(long)curproc->p_pid, curproc->p_comm, type);
- else if (type != T_BPTFLT && type != T_TRCTRAP)
+ else if (type != T_BPTFLT && type != T_TRCTRAP) {
/*
* XXX not quite right, since this may be for a
* multiple fault in user mode.
*/
printf("kernel trap %d with interrupts disabled\n",
type);
- /*
- * We should walk p_heldmtx here and see if any are
- * spin mutexes, and not do this if so.
- */
- enable_intr();
+ /*
+ * We should walk p_heldmtx here and see if any are
+ * spin mutexes, and not do this if so.
+ */
+ enable_intr();
+ }
}
eva = 0;
OpenPOWER on IntegriCloud