Commit be364a06 authored by John Johansen's avatar John Johansen Committed by Tim Gardner

UBUNTU: SAUCE: apparmor: Don't remove label on rcu callback if the label has already been removed

Double calling remove on a label does a double update of the replacedby
which is extra work and messes up tracking stats.
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent e454b023
......@@ -260,7 +260,8 @@ static void label_free_rcu(struct rcu_head *head)
{
struct aa_label *l = container_of(head, struct aa_label, rcu);
(void) aa_label_remove(labels_set(l), l);
if (l->flags & FLAG_IN_TREE)
(void) aa_label_remove(labels_set(l), l);
label_free_switch(l);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment