Module Name: src Committed By: mrg Date: Mon Dec 4 03:05:57 UTC 2017
Modified Files: src/usr.bin/vmstat: vmstat.c Log Message: deref the right address to get the pool_allocator. To generate a diff of this commit: cvs rdiff -u -r1.223 -r1.224 src/usr.bin/vmstat/vmstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/vmstat/vmstat.c diff -u src/usr.bin/vmstat/vmstat.c:1.223 src/usr.bin/vmstat/vmstat.c:1.224 --- src/usr.bin/vmstat/vmstat.c:1.223 Sun Dec 3 21:10:01 2017 +++ src/usr.bin/vmstat/vmstat.c Mon Dec 4 03:05:57 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: vmstat.c,v 1.223 2017/12/03 21:10:01 mrg Exp $ */ +/* $NetBSD: vmstat.c,v 1.224 2017/12/04 03:05:57 mrg Exp $ */ /*- * Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 3/1/95"; #else -__RCSID("$NetBSD: vmstat.c,v 1.223 2017/12/03 21:10:01 mrg Exp $"); +__RCSID("$NetBSD: vmstat.c,v 1.224 2017/12/04 03:05:57 mrg Exp $"); #endif #endif /* not lint */ @@ -968,8 +968,8 @@ dosum(void) uvmexp.poolpages = 0; for (; addr != NULL; addr = TAILQ_NEXT(pp, pr_poollist)) { deref_kptr(addr, pp, sizeof(*pp), "pool chain trashed"); - deref_kptr(addr, &pa, sizeof(pa), - "pool_allocator trashed"); + deref_kptr(pp->pr_alloc, &pa, sizeof(pa), + "pool allocator trashed"); bytes = pp->pr_npages * pa.pa_pagesz; if ((pp->pr_roflags & PR_RECURSIVE) != 0) bytes -= (pp->pr_nout * pp->pr_size);