Raise the IPL of the sbar taskq to avoid lock order issues
authorvisa <visa@openbsd.org>
Tue, 28 Nov 2017 16:22:27 +0000 (16:22 +0000)
committervisa <visa@openbsd.org>
Tue, 28 Nov 2017 16:22:27 +0000 (16:22 +0000)
with the kernel lock.

Fixes a deadlock seen by Hrvoje Popovski and dhill@.
OK mpi@, dhill@

sys/kern/kern_sched.c

index 50c86ec..54705ee 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: kern_sched.c,v 1.45 2017/02/12 04:55:08 guenther Exp $        */
+/*     $OpenBSD: kern_sched.c,v 1.46 2017/11/28 16:22:27 visa Exp $    */
 /*
  * Copyright (c) 2007, 2008 Artur Grabowski <art@openbsd.org>
  *
@@ -228,7 +228,7 @@ void
 sched_init_runqueues(void)
 {
 #ifdef MULTIPROCESSOR
-       sbartq = taskq_create("sbar", 1, IPL_NONE,
+       sbartq = taskq_create("sbar", 1, IPL_VM,
            TASKQ_MPSAFE | TASKQ_CANTSLEEP);
        if (sbartq == NULL)
                panic("unable to create sbar taskq");