mirror of
https://github.com/opnsense/src.git
synced 2026-04-29 18:32:49 -04:00
Evaluate the sysctl_running fail point before taking the sysctl lock.
The fail point handler may sleep, but this is not permitted while holding a rm read lock. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
361e428888
commit
87b87bb853
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue