svn commit: r251594 - in stable/9/sys: amd64/amd64 i386/i386

Konstantin Belousov kib at FreeBSD.org
Mon Jun 10 04:12:49 UTC 2013


Author: kib
Date: Mon Jun 10 04:12:48 2013
New Revision: 251594
URL: http://svnweb.freebsd.org/changeset/base/251594

Log:
  MFC r251324:
  Assert that interrupts are enabled in the trap handlers on x86 before
  calling generic code to deliver signals.

Modified:
  stable/9/sys/amd64/amd64/trap.c
  stable/9/sys/i386/i386/trap.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/amd64/amd64/trap.c
==============================================================================
--- stable/9/sys/amd64/amd64/trap.c	Mon Jun 10 04:09:14 2013	(r251593)
+++ stable/9/sys/amd64/amd64/trap.c	Mon Jun 10 04:12:48 2013	(r251594)
@@ -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: stable/9/sys/i386/i386/trap.c
==============================================================================
--- stable/9/sys/i386/i386/trap.c	Mon Jun 10 04:09:14 2013	(r251593)
+++ stable/9/sys/i386/i386/trap.c	Mon Jun 10 04:12:48 2013	(r251594)
@@ -779,6 +779,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-stable-9 mailing list