Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Add a KASSERT, otherwise it looks like a NULL deref...
details: https://anonhg.NetBSD.org/src/rev/2915198c74f7
branches: trunk
changeset: 351417:2915198c74f7
user: maxv <maxv%NetBSD.org@localhost>
date: Sun Feb 12 18:43:56 2017 +0000
description:
Add a KASSERT, otherwise it looks like a NULL deref; from Mootja.
diffstat:
sys/kern/kern_clock.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 04b4c700b102 -r 2915198c74f7 sys/kern/kern_clock.c
--- a/sys/kern/kern_clock.c Sun Feb 12 18:24:31 2017 +0000
+++ b/sys/kern/kern_clock.c Sun Feb 12 18:43:56 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_clock.c,v 1.134 2015/04/22 16:46:58 pooka Exp $ */
+/* $NetBSD: kern_clock.c,v 1.135 2017/02/12 18:43:56 maxv Exp $ */
/*-
* Copyright (c) 2000, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.134 2015/04/22 16:46:58 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.135 2017/02/12 18:43:56 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_dtrace.h"
@@ -394,6 +394,7 @@
}
if (CLKF_USERMODE(frame)) {
+ KASSERT(p != NULL);
if ((p->p_stflag & PST_PROFIL) && profsrc == PROFSRC_CLOCK)
addupc_intr(l, CLKF_PC(frame));
if (--spc->spc_pscnt > 0) {
Home |
Main Index |
Thread Index |
Old Index