svn commit: r333500 - head/sys/kern

Matt Macy mmacy at FreeBSD.org
Fri May 11 18:37:15 UTC 2018


Author: mmacy
Date: Fri May 11 18:37:14 2018
New Revision: 333500
URL: https://svnweb.freebsd.org/changeset/base/333500

Log:
  epoch(9): always set inited in epoch_init
  
  - set inited in the !usedomains case
  
  Reported by:	jhibbits
  Approved by:	sbruno

Modified:
  head/sys/kern/subr_epoch.c

Modified: head/sys/kern/subr_epoch.c
==============================================================================
--- head/sys/kern/subr_epoch.c	Fri May 11 17:26:59 2018	(r333499)
+++ head/sys/kern/subr_epoch.c	Fri May 11 18:37:14 2018	(r333500)
@@ -136,8 +136,10 @@ epoch_init(void *arg __unused)
 	migrate_count = counter_u64_alloc(M_WAITOK);
 	turnstile_count = counter_u64_alloc(M_WAITOK);
 	switch_count = counter_u64_alloc(M_WAITOK);
-	if (usedomains == false)
+	if (usedomains == false) {
+		inited = 1;
 		return;
+	}
 	count = domain = 0;
 	domoffsets[0] = 0;
 	for (domain = 0; domain < vm_ndomains; domain++) {
@@ -154,7 +156,6 @@ epoch_init(void *arg __unused)
 			break;
 		}
 	}
-
 	inited = 1;
 }
 SYSINIT(epoch, SI_SUB_CPU + 1, SI_ORDER_FIRST, epoch_init, NULL);


More information about the svn-src-all mailing list