Module Name:    src
Committed By:   skrll
Date:           Sat Jul 27 11:19:10 UTC 2013

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

Log Message:
Fix KASSERT to avoid assumptions about ipl order.

XXX Temporary measure?


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/kern/subr_cprng.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/subr_cprng.c
diff -u src/sys/kern/subr_cprng.c:1.21 src/sys/kern/subr_cprng.c:1.22
--- src/sys/kern/subr_cprng.c:1.21	Mon Jul  1 15:22:00 2013
+++ src/sys/kern/subr_cprng.c	Sat Jul 27 11:19:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_cprng.c,v 1.21 2013/07/01 15:22:00 riastradh Exp $ */
+/*	$NetBSD: subr_cprng.c,v 1.22 2013/07/27 11:19:09 skrll Exp $ */
 
 /*-
  * Copyright (c) 2011-2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.21 2013/07/01 15:22:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.22 2013/07/27 11:19:09 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -115,7 +115,7 @@ cprng_strong_create(const char *name, in
 	 * rndsink_request takes a spin lock at IPL_VM, so we can be no
 	 * higher than that.
 	 */
-	KASSERT(ipl <= IPL_VM);
+	KASSERT(ipl != IPL_SCHED && ipl != IPL_HIGH);
 
 	/* Initialize the easy fields.  */
 	(void)strlcpy(cprng->cs_name, name, sizeof(cprng->cs_name));

Reply via email to