This fixes evcount_list corruption that happened when evcount_percpu()
was called after evcount_init_percpu().
OK jca@ cheloha@ jmatthew@
-/* $OpenBSD: subr_evcount.c,v 1.14 2022/11/10 07:05:41 jmatthew Exp $ */
+/* $OpenBSD: subr_evcount.c,v 1.15 2022/12/05 08:58:49 visa Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
* Copyright (c) 2004 Aaron Campbell <aaron@openbsd.org>
TAILQ_INSERT_TAIL(&evcount_percpu_init_list, ec, next);
} else {
ec->ec_percpu = counters_alloc(1);
- TAILQ_INSERT_TAIL(&evcount_list, ec, next);
}
}