git: c5ad71c31160 - stable/14 - eventhandler: Fix the NODEBUG build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 May 2026 21:40:28 UTC
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=c5ad71c31160114752f5a4c1524349772105f6d0
commit c5ad71c31160114752f5a4c1524349772105f6d0
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-05-06 14:39:52 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-05-29 21:40:22 +0000
eventhandler: Fix the NODEBUG build
Reported by: Michael Butler <imb@protected-networks.net>
Fixes: 735b16d490ae ("eventhandler: Fix a race when pruning eventhandlers")
(cherry picked from commit 3d8928114c4fec6cefbb1cd566ef8d1b3d2999e2)
---
sys/kern/subr_eventhandler.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sys/kern/subr_eventhandler.c b/sys/kern/subr_eventhandler.c
index ccbb07b826b8..6e34f61475b4 100644
--- a/sys/kern/subr_eventhandler.c
+++ b/sys/kern/subr_eventhandler.c
@@ -289,10 +289,12 @@ void
eventhandler_prune_list(struct eventhandler_list *list)
{
struct eventhandler_entry *ep, *en;
- int pruned = 0;
+ int pruned __diagused;
CTR2(KTR_EVH, "%s: pruning list \"%s\"", __func__, list->el_name);
EHL_LOCK_ASSERT(list, MA_OWNED);
+
+ pruned = 0;
TAILQ_FOREACH_SAFE(ep, &list->el_entries, ee_link, en) {
if (ep->ee_priority == EHE_DEAD_PRIORITY) {
TAILQ_REMOVE(&list->el_entries, ep, ee_link);