aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2026-01-23 15:09:56 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2026-01-29 18:11:56 +0000
commit5a6e0e31bc2e8ed8f655be63fa5b8c41f3d60753 (patch)
tree1ebc0eab5a47b04f6e50b61ff9d18704e9649486
parentb602ba1b5fd92bb226e32f5720885f856a5cb0bb (diff)
sysctl kern.sched.ule.topology_spec: allow to run if ULE is not initialized
Reviewed by: olce Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54831
-rw-r--r--sys/kern/sched_ule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index 7a745619480d..334b3c0f1de3 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -3543,7 +3543,8 @@ sysctl_kern_sched_ule_topology_spec(SYSCTL_HANDLER_ARGS)
struct sbuf *topo;
int err;
- KASSERT(cpu_top != NULL, ("cpu_top isn't initialized"));
+ if (cpu_top == NULL)
+ return (ENOTTY);
topo = sbuf_new_for_sysctl(NULL, NULL, 512, req);
if (topo == NULL)