svn commit: r251324 - in head/sys: amd64/amd64 i386/i386
Konstantin Belousov
kib at FreeBSD.org
Mon Jun 3 17:40:06 UTC 2013
Author: kib
Date: Mon Jun 3 17:40:05 2013
New Revision: 251324
URL: http://svnweb.freebsd.org/changeset/base/251324
Log:
Assert that interrupts are enabled in the trap handlers on x86 before
calling generic code to deliver signals.
Discussed with: bde
Tested by: pho
MFC after: 1 week
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 Jun 3 17:38:57 2013 (r251323)
+++ head/sys/amd64/amd64/trap.c Mon Jun 3 17:40:05 2013 (r251324)
@@ -630,6 +630,7 @@ trap(struct trapframe *frame)
fubyte((void *)(frame->tf_rip + 6)),
fubyte((void *)(frame->tf_rip + 7)));
}
+ KASSERT((read_rflags() & PSL_I) != 0, ("interrupts disabled"));
trapsignal(td, &ksi);
user:
Modified: head/sys/i386/i386/trap.c
==============================================================================
--- head/sys/i386/i386/trap.c Mon Jun 3 17:38:57 2013 (r251323)
+++ head/sys/i386/i386/trap.c Mon Jun 3 17:40:05 2013 (r251324)
@@ -780,6 +780,7 @@ trap(struct trapframe *frame)
fubyte((void *)(frame->tf_eip + 6)),
fubyte((void *)(frame->tf_eip + 7)));
}
+ KASSERT((read_eflags() & PSL_I) != 0, ("interrupts disabled"));
trapsignal(td, &ksi);
#ifdef DEBUG
More information about the svn-src-head
mailing list