[RFC 5/9] apparmor: Switch intree labels to percpu mode
Neeraj Upadhyay
Neeraj.Upadhyay at amd.com
Wed Jan 10 11:18:52 UTC 2024
Now that we have an infrastructure to reclaim
the percpu labels, switch intree labels to
percpu mode, to improve the ref scalability.
Signed-off-by: Neeraj Upadhyay <Neeraj.Upadhyay at amd.com>
---
security/apparmor/label.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/security/apparmor/label.c b/security/apparmor/label.c
index aa9e6eac3ecc..1299262f54e1 100644
--- a/security/apparmor/label.c
+++ b/security/apparmor/label.c
@@ -710,6 +710,8 @@ static struct aa_label *__label_insert(struct aa_labelset *ls,
rb_link_node(&label->node, parent, new);
rb_insert_color(&label->node, &ls->root);
label->flags |= FLAG_IN_TREE;
+ percpu_ref_switch_to_percpu(&label->count);
+ aa_label_reclaim_add_label(label);
return aa_get_label(label);
}
--
2.34.1
More information about the Linux-security-module-archive
mailing list