git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
audit: move put_tree() to avoid trim_trees refcount underflow and UAF
[sfrench/cifs-2.6.git]
/
kernel
/
audit_tree.c
diff --git
a/kernel/audit_tree.c
b/kernel/audit_tree.c
index b2be4e978ba3e3de709627b42f79b0fe12db08ef..2cd7b5694422d4e8a18321c6fdbe1984aef3a9d5 100644
(file)
--- a/
kernel/audit_tree.c
+++ b/
kernel/audit_tree.c
@@
-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 */