Commit 09571c43 authored by John Johansen's avatar John Johansen Committed by Tim Gardner

UBUNTU: SAUCE: fixup: 20/23 locking issue around in __label_update

aa_label_remove needs to take the ls write lock but, we are already
holding it so move to __aa_label_remove

also fix bug where the old label is not being forwarded to the new label
when it results in a new namespace due to an the old ns being removed.
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 82c55fe3
......@@ -1844,7 +1844,7 @@ 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)) {
aa_label_remove(labels_set(label), label);
__aa_label_remove(labels_set(label), label, l);
write_unlock_irqrestore(&ls->lock, flags);
tmp = aa_label_insert(labels_set(l), l);
goto out;
......
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