summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2010-07-07 15:35:23 +0000
committerkettenis <kettenis@openbsd.org>2010-07-07 15:35:23 +0000
commit5b3ffbb4a8abf9b8ded393ee99d204ff863cb09f (patch)
tree166818753d135c9d3b5b447290acd0f637851da4
parentRemove duplicate mtod(). No need to do it twice since the mbuf is not (diff)
downloadwireguard-openbsd-5b3ffbb4a8abf9b8ded393ee99d204ff863cb09f.tar.xz
wireguard-openbsd-5b3ffbb4a8abf9b8ded393ee99d204ff863cb09f.zip
Don't grab the kernel lock for clock interrupts. Prevents deadlocks when
running stuff that depends on mutexes without holding the kernel lock. ok art@
-rw-r--r--sys/arch/sparc64/sparc64/intr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc64/sparc64/intr.c b/sys/arch/sparc64/sparc64/intr.c
index 3a56322d448..d034d6f5a06 100644
--- a/sys/arch/sparc64/sparc64/intr.c
+++ b/sys/arch/sparc64/sparc64/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.35 2010/04/16 22:35:24 kettenis Exp $ */
+/* $OpenBSD: intr.c,v 1.36 2010/07/07 15:35:23 kettenis Exp $ */
/* $NetBSD: intr.c,v 1.39 2001/07/19 23:38:11 eeh Exp $ */
/*
@@ -369,14 +369,14 @@ void sparc64_intunlock(struct trapframe64 *);
void
sparc64_intlock(struct trapframe64 *tf)
{
- if(tf->tf_pil < PIL_SCHED)
+ if (tf->tf_pil < PIL_SCHED && tf->tf_pil != PIL_CLOCK)
__mp_lock(&kernel_lock);
}
void
sparc64_intunlock(struct trapframe64 *tf)
{
- if(tf->tf_pil < PIL_SCHED)
+ if (tf->tf_pil < PIL_SCHED && tf->tf_pil != PIL_CLOCK)
__mp_unlock(&kernel_lock);
}