Module Name: src
Committed By: thorpej
Date: Sun Dec 6 13:45:58 UTC 2020
Modified Files:
src/sys/kern: kern_time.c
Log Message:
Fix an uninitialized pointer deref introduced in rev 1.207.
Reported-by: [email protected]
To generate a diff of this commit:
cvs rdiff -u -r1.207 -r1.208 src/sys/kern/kern_time.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/kern_time.c
diff -u src/sys/kern/kern_time.c:1.207 src/sys/kern/kern_time.c:1.208
--- src/sys/kern/kern_time.c:1.207 Sat Dec 5 18:17:01 2020
+++ src/sys/kern/kern_time.c Sun Dec 6 13:45:58 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_time.c,v 1.207 2020/12/05 18:17:01 thorpej Exp $ */
+/* $NetBSD: kern_time.c,v 1.208 2020/12/06 13:45:58 thorpej Exp $ */
/*-
* Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009, 2020
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.207 2020/12/05 18:17:01 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.208 2020/12/06 13:45:58 thorpej Exp $");
#include <sys/param.h>
#include <sys/resourcevar.h>
@@ -1243,10 +1243,10 @@ timer_create1(timer_t *tid, clockid_t id
switch (id) {
case CLOCK_VIRTUAL:
- itl = &pt->pt_proc->p_timers->pts_virtual;
+ itl = &pts->pts_virtual;
break;
case CLOCK_PROF:
- itl = &pt->pt_proc->p_timers->pts_prof;
+ itl = &pts->pts_prof;
break;
default:
itl = NULL;
@@ -1642,11 +1642,11 @@ dosetitimer(struct proc *p, int which, s
pt->pt_ev.sigev_signo = SIGALRM;
break;
case ITIMER_VIRTUAL:
- itl = &pt->pt_proc->p_timers->pts_virtual;
+ itl = &pts->pts_virtual;
pt->pt_ev.sigev_signo = SIGVTALRM;
break;
case ITIMER_PROF:
- itl = &pt->pt_proc->p_timers->pts_prof;
+ itl = &pts->pts_prof;
pt->pt_ev.sigev_signo = SIGPROF;
break;
}