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

Revert "UBUNTU: SAUCE: apparmor: Fix: deadlock in aa_put_label() call chain"

BugLink: http://bugs.launchpad.net/bugs/1379535

This reverts commit 981d09c847dd7a382c069e81b4dd9ae0b180d698.
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent a2a815e5
......@@ -234,8 +234,10 @@ void aa_label_free(struct aa_label *label)
kfree(label);
}
static void label_free_switch(struct aa_label *l)
static void label_free_rcu(struct rcu_head *head)
{
struct aa_label *l = container_of(head, struct aa_label, rcu);
if (l->flags & FLAG_NS_COUNT)
aa_free_namespace(labels_ns(l));
else if (label_isprofile(l))
......@@ -244,14 +246,6 @@ static void label_free_switch(struct aa_label *l)
aa_label_free(l);
}
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);
label_free_switch(l);
}
bool aa_label_remove(struct aa_labelset *ls, struct aa_label *label);
void aa_label_kref(struct kref *kref)
{
......@@ -260,10 +254,12 @@ void aa_label_kref(struct kref *kref)
if (!ns) {
/* never live, no rcu callback needed, just using the fn */
label_free_switch(l);
label_free_rcu(&l->rcu);
return;
}
(void) aa_label_remove(&ns->labels, l);
/* TODO: if compound label and not invalid add to reclaim cache */
call_rcu(&l->rcu, label_free_rcu);
}
......
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