]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - kernel/audit_tree.c
perf: Fix list corruption in perf_cgroup_switch()
[mirror_ubuntu-jammy-kernel.git] / kernel / audit_tree.c
index b2be4e978ba3e3de709627b42f79b0fe12db08ef..2cd7b5694422d4e8a18321c6fdbe1984aef3a9d5 100644 (file)
@@ -593,7 +593,6 @@ static void prune_tree_chunks(struct audit_tree *victim, bool tagged)
                spin_lock(&hash_lock);
        }
        spin_unlock(&hash_lock);
-       put_tree(victim);
 }
 
 /*
@@ -602,6 +601,7 @@ static void prune_tree_chunks(struct audit_tree *victim, bool tagged)
 static void prune_one(struct audit_tree *victim)
 {
        prune_tree_chunks(victim, false);
+       put_tree(victim);
 }
 
 /* trim the uncommitted chunks from tree */