Module Name:    src
Committed By:   martin
Date:           Sat May  2 09:13:40 UTC 2020

Modified Files:
        src/sys/kern: kern_lock.c

Log Message:
Fix inverted condition in r1.136 - we do want LOCKDEBUG spinouts of the
kernel lock to assert as soon as we have userland running - not in
the early boot phase (where firmware loading and device init could take
a long time).


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/sys/kern/kern_lock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_lock.c
diff -u src/sys/kern/kern_lock.c:1.170 src/sys/kern/kern_lock.c:1.171
--- src/sys/kern/kern_lock.c:1.170	Sun Mar  8 15:05:18 2020
+++ src/sys/kern/kern_lock.c	Sat May  2 09:13:40 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_lock.c,v 1.170 2020/03/08 15:05:18 ad Exp $	*/
+/*	$NetBSD: kern_lock.c,v 1.171 2020/05/02 09:13:40 martin Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2020 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.170 2020/03/08 15:05:18 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.171 2020/05/02 09:13:40 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_lockdebug.h"
@@ -240,7 +240,7 @@ _kernel_lock(int nlocks)
 #ifdef LOCKDEBUG
 			if (SPINLOCK_SPINOUT(spins)) {
 				extern int start_init_exec;
-				if (!start_init_exec)
+				if (start_init_exec)
 					_KERNEL_LOCK_ABORT("spinout");
 			}
 			SPINLOCK_BACKOFF_HOOK;

Reply via email to