Lines Matching refs:rules
243 static void free_ruleset(struct aa_ruleset *rules) in free_ruleset() argument
247 aa_put_pdb(rules->file); in free_ruleset()
248 aa_put_pdb(rules->policy); in free_ruleset()
249 aa_free_cap_rules(&rules->caps); in free_ruleset()
250 aa_free_rlimit_rules(&rules->rlimits); in free_ruleset()
252 for (i = 0; i < rules->secmark_count; i++) in free_ruleset()
253 kfree_sensitive(rules->secmark[i].label); in free_ruleset()
254 kfree_sensitive(rules->secmark); in free_ruleset()
255 kfree_sensitive(rules); in free_ruleset()
260 struct aa_ruleset *rules; in aa_alloc_ruleset() local
262 rules = kzalloc(sizeof(*rules), gfp); in aa_alloc_ruleset()
263 if (rules) in aa_alloc_ruleset()
264 INIT_LIST_HEAD(&rules->list); in aa_alloc_ruleset()
266 return rules; in aa_alloc_ruleset()
303 list_for_each_entry_safe(rule, tmp, &profile->rules, list) { in aa_free_profile()
335 struct aa_ruleset *rules; in aa_alloc_profile() local
347 INIT_LIST_HEAD(&profile->rules); in aa_alloc_profile()
350 rules = aa_alloc_ruleset(gfp); in aa_alloc_profile()
351 if (!rules) in aa_alloc_profile()
353 list_add(&rules->list, &profile->rules); in aa_alloc_profile()
621 struct aa_ruleset *rules; in aa_alloc_null() local
629 rules = list_first_entry(&profile->rules, typeof(*rules), list); in aa_alloc_null()
630 rules->file = aa_get_pdb(nullpdb); in aa_alloc_null()
631 rules->policy = aa_get_pdb(nullpdb); in aa_alloc_null()