Skip to content

Commit

Permalink
apparmor: fix put() parent ref after updating the active ref
Browse files Browse the repository at this point in the history
Signed-off-by: John Johansen <[email protected]>
Acked-by: Seth Arnold <[email protected]>
  • Loading branch information
John Johansen committed Jul 12, 2016
1 parent 6059f71 commit f351841
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/apparmor/policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f351841

Please sign in to comment.