Merge tag 'apparmor-pr-2017-11-21' of git://git.kernel.org/pub/scm/linux/kernel/git...
[muen/linux.git] / security / apparmor / label.c
index ad28e03a6f30341ab013e23cc2641f144ab44ea1..324fe5c60f8781c952138d0a764a5c2223f6353b 100644 (file)
@@ -2115,7 +2115,7 @@ void __aa_labelset_update_subtree(struct aa_ns *ns)
        __labelset_update(ns);
 
        list_for_each_entry(child, &ns->sub_ns, base.list) {
-               mutex_lock(&child->lock);
+               mutex_lock_nested(&child->lock, child->level);
                __aa_labelset_update_subtree(child);
                mutex_unlock(&child->lock);
        }