[apparmor] [PATCH 09/16] apparmor: fix: put() parent ref after updating the active ref

Seth Arnold seth.arnold at canonical.com
Wed Apr 27 23:41:29 UTC 2016


On Wed, Apr 20, 2016 at 11:52:51PM -0700, John Johansen wrote:
> Signed-off-by: John Johansen <john.johansen at canonical.com>

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> ---
>  security/apparmor/policy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160427/7c5e4820/attachment.pgp>


More information about the AppArmor mailing list