diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 803951f2e287..f57cd5889023 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -166,6 +166,8 @@ sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, intmax_t arg2, if (!(oid->oid_kind & CTLFLAG_MPSAFE)) mtx_unlock(&Giant); + KFAIL_POINT_ERROR(_debug_fail_point, sysctl_running, error); + if (tracker != NULL) SYSCTL_RLOCK(tracker); else @@ -1838,8 +1840,6 @@ sysctl_root(SYSCTL_HANDLER_ARGS) #endif error = sysctl_root_handler_locked(oid, arg1, arg2, req, &tracker); - KFAIL_POINT_ERROR(_debug_fail_point, sysctl_running, error); - out: SYSCTL_RUNLOCK(&tracker); return (error);