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

Revert "UBUNTU: SAUCE: apparmor: Fix: insert race between label_update and label_merge"

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

This reverts commit c8cf841fc8307461847036d2be2ad27791be485b.
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent e558d44c
......@@ -1782,22 +1782,15 @@ static struct aa_label *__label_update(struct aa_label *label)
if (invcount) {
l->size -= aa_sort_and_merge_profiles(l->size, &l->ent[0]);
if (labels_set(label) == labels_set(l)) {
goto insert;
AA_BUG(__aa_label_remove_and_insert(labels_set(label), label, l) != l);
} else {
aa_label_remove(labels_set(label), label);
goto other_ls_insert;
}
} else {
AA_BUG(labels_ns(label) != labels_ns(l));
goto insert;
AA_BUG(__aa_label_remove_and_insert(labels_set(label), label, l) != l);
}
insert:
tmp = __aa_label_remove_and_insert(labels_set(label), label, l);
if (tmp != l) {
aa_get_label(tmp);
aa_label_free(l);
}
write_unlock_irqrestore(&ls->lock, flags);
return 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