diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-03-01 07:08:28 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-03-01 07:08:28 +0000 |
commit | c22e6644ff1206c04354ac159441edd932fb06f2 (patch) | |
tree | fe7045591fb62a3b1398cefdb7c4c1cc10e26d44 /sys/arch/amd64 | |
parent | 575ccdb8c7266f61e9d149d127af9f5be8201c97 (diff) |
bring the splassert semantic from sparc64 to amd64. splassert in interrupt
handlers now checks that the spl the isr was established at is the same as
the one passed to splassert. this lets you check that isrs dont enter code
that have insufficient protection if entered from process context.
ok kettenis@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 8da63781347..e8815274bb1 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.102 2009/11/23 16:21:54 pirofti Exp $ */ +/* $OpenBSD: machdep.c,v 1.103 2010/03/01 07:08:27 dlg Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -1768,7 +1768,8 @@ splassert_check(int wantipl, const char *func) { int cpl = curcpu()->ci_ilevel; - if (cpl < wantipl) { + if (cpl < wantipl || + (curcpu()->ci_idepth && cpl > wantipl)) { splassert_fail(wantipl, cpl, func); } } |