Module Name: src Committed By: jym Date: Tue Oct 20 17:24:22 UTC 2009
Modified Files: src/sys/kern: subr_pool.c Log Message: Fix a bug where on MP systems, pool_cache_invalidate(9) could be called early during boot, just after CPUs are attached but before they are marked as running. This will result in a list of CPUs without the SPCF_RUNNING flag set, and will trigger the 'KASSERT(xc_tailp < xc_headp)' in xc_lowpri() as no cross call is issued. Bug reported and patch tested by t...@. See also http://mail-index.netbsd.org/tech-kern/2009/10/19/msg006293.html To generate a diff of this commit: cvs rdiff -u -r1.176 -r1.177 src/sys/kern/subr_pool.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_pool.c diff -u src/sys/kern/subr_pool.c:1.176 src/sys/kern/subr_pool.c:1.177 --- src/sys/kern/subr_pool.c:1.176 Thu Oct 15 20:50:12 2009 +++ src/sys/kern/subr_pool.c Tue Oct 20 17:24:22 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pool.c,v 1.176 2009/10/15 20:50:12 thorpej Exp $ */ +/* $NetBSD: subr_pool.c,v 1.177 2009/10/20 17:24:22 jym Exp $ */ /*- * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.176 2009/10/15 20:50:12 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.177 2009/10/20 17:24:22 jym Exp $"); #include "opt_ddb.h" #include "opt_pool.h" @@ -2300,7 +2300,7 @@ pcg_t *full, *empty, *part; uint64_t where; - if (ncpu < 2) { + if (ncpu < 2 || !mp_online) { /* * We might be called early enough in the boot process * for the CPU data structures to not be fully initialized.