Module Name: src Committed By: bouyer Date: Sun Jan 13 16:13:04 UTC 2013
Modified Files: src/sys/dev [netbsd-5-0]: lockstat.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1826): sys/dev/lockstat.c: revision 1.16 Fix off by one. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.15.16.1 src/sys/dev/lockstat.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/dev/lockstat.c diff -u src/sys/dev/lockstat.c:1.15 src/sys/dev/lockstat.c:1.15.16.1 --- src/sys/dev/lockstat.c:1.15 Mon Apr 28 20:23:46 2008 +++ src/sys/dev/lockstat.c Sun Jan 13 16:13:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: lockstat.c,v 1.15 2008/04/28 20:23:46 martin Exp $ */ +/* $NetBSD: lockstat.c,v 1.15.16.1 2013/01/13 16:13:03 bouyer Exp $ */ /*- * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lockstat.c,v 1.15 2008/04/28 20:23:46 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lockstat.c,v 1.15.16.1 2013/01/13 16:13:03 bouyer Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -270,7 +270,7 @@ lockstat_stop(lsdisable_t *ld) cpuno = 0; for (CPU_INFO_FOREACH(cii, ci)) { - if (cpuno > sizeof(ld->ld_freq) / sizeof(ld->ld_freq[0])) { + if (cpuno >= sizeof(ld->ld_freq) / sizeof(ld->ld_freq[0])) { log(LOG_WARNING, "lockstat: too many CPUs\n"); break; }