summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-06-03 17:40:05 +0000
committerkib <kib@FreeBSD.org>2013-06-03 17:40:05 +0000
commit17884c1f078d8833fdefc02385f0cf4ee6daf7e9 (patch)
treeb3b21b330805ffd76f49f319f6ec38ea80a69874 /sys/amd64
parente32d3d0bca6bd59c4392ecae0b7d711dedc0a6d4 (diff)
downloadFreeBSD-src-17884c1f078d8833fdefc02385f0cf4ee6daf7e9.zip
FreeBSD-src-17884c1f078d8833fdefc02385f0cf4ee6daf7e9.tar.gz
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
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/trap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 1e6b58c..3eaf3fd 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -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:
OpenPOWER on IntegriCloud