On Wed, May 01, 2013 at 02:30:58PM -0700, John Johansen wrote:
> Signed-off-by: John Johansen <[email protected]>

Acked-by: Seth Arnold <[email protected]>

> ---
>  security/apparmor/apparmorfs.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
> index b079cea..bfc8015 100644
> --- a/security/apparmor/apparmorfs.c
> +++ b/security/apparmor/apparmorfs.c
> @@ -413,8 +413,11 @@ void __aa_fs_namespace_rmdir(struct aa_namespace *ns)
>       list_for_each_entry(child, &ns->base.profiles, base.list)
>               __aa_fs_profile_rmdir(child);
>  
> -     list_for_each_entry(sub, &ns->sub_ns, base.list)
> +     list_for_each_entry(sub, &ns->sub_ns, base.list) {
> +             mutex_lock(&sub->lock);
>               __aa_fs_namespace_rmdir(sub);
> +             mutex_unlock(&sub->lock);
> +     }
>  
>       for (i = AAFS_NS_SIZEOF - 1; i >= 0 ; --i) {
>               securityfs_remove(ns->dents[i]);
> @@ -455,7 +458,9 @@ int __aa_fs_namespace_mkdir(struct aa_namespace *ns, 
> struct dentry *parent,
>       }
>  
>       list_for_each_entry(sub, &ns->sub_ns, base.list) {
> +             mutex_lock(&sub->lock);
>               error = __aa_fs_namespace_mkdir(sub, ns_subns_dir(ns), NULL);
> +             mutex_unlock(&sub->lock);
>               if (error)
>                       goto fail2;
>       }

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to