summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2016-04-16 20:59:02 (GMT)
committerJohn Johansen <john.johansen@canonical.com>2016-07-12 15:43:10 (GMT)
commitf351841f8d41072e741e45299070d421a5833a4a (patch)
treeba9ea8ffed6de142bc1eb814e93f5509bdde50ca
parent6059f71f1e94486a51cef90e872add11fa7b5775 (diff)
downloadlinux-f351841f8d41072e741e45299070d421a5833a4a.tar.xz
apparmor: fix put() parent ref after updating the active ref
Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Seth Arnold <seth.arnold@canonical.com>
-rw-r--r--security/apparmor/policy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
index c92a9f6..455c9f8 100644
--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -1187,8 +1187,8 @@ ssize_t aa_replace_profiles(void *udata, size_t size, bool noreplace)
/* parent replaced in this atomic set? */
if (newest != parent) {
aa_get_profile(newest);
- aa_put_profile(parent);
rcu_assign_pointer(ent->new->parent, newest);
+ aa_put_profile(parent);
}
/* aafs interface uses replacedby */
rcu_assign_pointer(ent->new->replacedby->profile,