svn commit: r197389 - in head/sys: amd64/amd64 i386/i386
Konstantin Belousov
kib at FreeBSD.org
Mon Sep 21 09:41:53 UTC 2009
Author: kib
Date: Mon Sep 21 09:41:51 2009
New Revision: 197389
URL: http://svn.freebsd.org/changeset/base/197389
Log:
If CPU happens to be in usermode when a T_RESERVED trap occured,
then trapsignal is called with ksi.ksi_signo = 0. For debugging kernels,
that should end up in panic, for non-debugging kernels behaviour is
undefined.
Do panic regardeless of execution mode at the moment of trap.
Reviewed by: jhb
MFC after: 1 month
Modified:
head/sys/amd64/amd64/trap.c
head/sys/i386/i386/trap.c
Modified: head/sys/amd64/amd64/trap.c
==============================================================================
--- head/sys/amd64/amd64/trap.c Mon Sep 21 09:09:55 2009 (r197388)
+++ head/sys/amd64/amd64/trap.c Mon Sep 21 09:41:51 2009 (r197389)
@@ -253,6 +253,11 @@ trap(struct trapframe *frame)
}
#endif
+ if (type == T_RESERVED) {
+ trap_fatal(frame, 0);
+ goto out;
+ }
+
#ifdef HWPMC_HOOKS
/*
* CPU PMCs interrupt using an NMI. If the PMC module is
Modified: head/sys/i386/i386/trap.c
==============================================================================
--- head/sys/i386/i386/trap.c Mon Sep 21 09:09:55 2009 (r197388)
+++ head/sys/i386/i386/trap.c Mon Sep 21 09:41:51 2009 (r197389)
@@ -225,6 +225,11 @@ trap(struct trapframe *frame)
}
#endif
+ if (type == T_RESERVED) {
+ trap_fatal(frame, 0);
+ goto out;
+ }
+
#ifdef HWPMC_HOOKS
/*
* CPU PMCs interrupt using an NMI so we check for that first.
More information about the svn-src-all
mailing list