Module Name: src
Committed By: snj
Date: Mon Nov 26 17:19:46 UTC 2018
Modified Files:
src/sys/kern [netbsd-8]: subr_evcnt.c
Log Message:
Apply patch (requested by maxv in ticket #1106):
Fix kernel information leak.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.22.1 src/sys/kern/subr_evcnt.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_evcnt.c
diff -u src/sys/kern/subr_evcnt.c:1.12 src/sys/kern/subr_evcnt.c:1.12.22.1
--- src/sys/kern/subr_evcnt.c:1.12 Tue Feb 25 18:30:11 2014
+++ src/sys/kern/subr_evcnt.c Mon Nov 26 17:19:46 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_evcnt.c,v 1.12 2014/02/25 18:30:11 pooka Exp $ */
+/* $NetBSD: subr_evcnt.c,v 1.12.22.1 2018/11/26 17:19:46 snj Exp $ */
/*
* Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_evcnt.c,v 1.12 2014/02/25 18:30:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_evcnt.c,v 1.12.22.1 2018/11/26 17:19:46 snj Exp $");
#include <sys/param.h>
#include <sys/evcnt.h>
@@ -257,7 +257,7 @@ sysctl_doevcnt(SYSCTLFN_ARGS)
sysctl_unlock();
if (oldp != NULL && xevs0 == NULL)
- xevs0 = kmem_alloc(sizeof(*xevs0), KM_SLEEP);
+ xevs0 = kmem_zalloc(sizeof(*xevs0), KM_SLEEP);
retries = 100;
retry: