diff options
author | John Johansen <john.johansen@canonical.com> | 2016-04-16 13:59:02 -0700 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2017-01-27 11:16:09 +0100 |
commit | 723ace24a961a97711f2461affd52a4d91fd977b (patch) | |
tree | 167113c8373973031e1a2c066624fe8d7a1de02e | |
parent | d310760cc000323f0eab566f2f112819b06efc4e (diff) | |
download | linux-stable-723ace24a961a97711f2461affd52a4d91fd977b.tar.gz linux-stable-723ace24a961a97711f2461affd52a4d91fd977b.tar.bz2 linux-stable-723ace24a961a97711f2461affd52a4d91fd977b.zip |
apparmor: fix put() parent ref after updating the active ref
commit f351841f8d41072e741e45299070d421a5833a4a upstream.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r-- | security/apparmor/policy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c index c92a9f6c1be5..455c9f89f7e2 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, |