summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-10-27 22:37:04 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-10-27 22:37:04 +0000
commit84beca09020e9bcfd9918e33368dee32176666bb (patch)
tree0c230c8170c62e1404b414b43c5cb37edf1bce6c
parentc9f078c2e91060f3c3781ab2ab88042342ae1c67 (diff)
Grab kernel lock before calling interrupt handlers.
ok miod@, deraadt@
-rw-r--r--sys/arch/macppc/dev/openpic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c
index 7a93112979e..f3be80fe373 100644
--- a/sys/arch/macppc/dev/openpic.c
+++ b/sys/arch/macppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.40 2007/05/29 18:10:43 miod Exp $ */
+/* $OpenBSD: openpic.c,v 1.41 2007/10/27 22:37:03 kettenis Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -650,8 +650,10 @@ ext_intr_openpic()
while (ih) {
ppc_intr_enable(1);
+ KERNEL_LOCK();
if ((*ih->ih_fun)(ih->ih_arg))
ih->ih_count.ec_count++;
+ KERNEL_UNLOCK();
(void)ppc_intr_disable();
ih = ih->ih_next;