MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rctl_rule_release

Function rctl_rule_release

freebsd/kern/kern_rctl.c:1084–1102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1082}
1083
1084void
1085rctl_rule_release(struct rctl_rule *rule)
1086{
1087
1088 ASSERT_RACCT_ENABLED();
1089 KASSERT(rule->rr_refcount > 0, ("rule->rr_refcount <= 0"));
1090
1091 if (refcount_release(&rule->rr_refcount)) {
1092 /*
1093 * rctl_rule_release() is often called when iterating
1094 * over all the uidinfo structures in the system,
1095 * holding uihashtbl_lock. Since rctl_rule_free()
1096 * might end up calling uifree(), this would lead
1097 * to lock recursion. Use taskqueue to avoid this.
1098 */
1099 TASK_INIT(&rule->rr_task, 0, rctl_rule_free, rule);
1100 taskqueue_enqueue(taskqueue_thread, &rule->rr_task);
1101 }
1102}
1103
1104static int
1105rctl_rule_fully_specified(const struct rctl_rule *rule)

Callers 11

rctl_racct_remove_rulesFunction · 0.85
rctl_string_to_ruleFunction · 0.85
rctl_rule_addFunction · 0.85
sys_rctl_get_racctFunction · 0.85
sys_rctl_get_rulesFunction · 0.85
sys_rctl_get_limitsFunction · 0.85
sys_rctl_add_ruleFunction · 0.85
sys_rctl_remove_ruleFunction · 0.85
rctl_proc_ucred_changedFunction · 0.85
rctl_proc_forkFunction · 0.85
rctl_racct_releaseFunction · 0.85

Calls 2

refcount_releaseFunction · 0.85
taskqueue_enqueueFunction · 0.85

Tested by

no test coverage detected