Module Name: src Committed By: riastradh Date: Wed Jun 2 21:34:58 UTC 2021
Modified Files: src/sys/kern: kern_tc.c Log Message: timecounter(9): Zero the next pointer after tc_detach. This reverts it to a state where tc_init works again. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/kern/kern_tc.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_tc.c diff -u src/sys/kern/kern_tc.c:1.61 src/sys/kern/kern_tc.c:1.62 --- src/sys/kern/kern_tc.c:1.61 Thu Apr 8 06:20:47 2021 +++ src/sys/kern/kern_tc.c Wed Jun 2 21:34:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_tc.c,v 1.61 2021/04/08 06:20:47 simonb Exp $ */ +/* $NetBSD: kern_tc.c,v 1.62 2021/06/02 21:34:58 riastradh Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #include <sys/cdefs.h> /* __FBSDID("$FreeBSD: src/sys/kern/kern_tc.c,v 1.166 2005/09/19 22:16:31 andre Exp $"); */ -__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.61 2021/04/08 06:20:47 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.62 2021/06/02 21:34:58 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_ntp.h" @@ -698,10 +698,13 @@ tc_detach(struct timecounter *target) * before retrying. */ if (l == NULL) { - return 0; + break; } (void)kpause("tcdetach", false, mstohz(10), NULL); } + + tc->tc_next = NULL; + return 0; } /* Report the frequency of the current timecounter. */