summaryrefslogtreecommitdiffstats
path: root/security/apparmor/policy.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2013-07-10 21:11:43 -0700
committerJohn Johansen <john.johansen@canonical.com>2013-08-14 11:42:06 -0700
commit8651e1d6572bc2c061073f05fabcd7175789259d (patch)
tree84f6bb6271463b5d247d7a63d163c3ae37a1d7ea /security/apparmor/policy.c
parent742058b0f3a2ed32e2a7349aff97989dc4e32452 (diff)
downloadop-kernel-dev-8651e1d6572bc2c061073f05fabcd7175789259d.zip
op-kernel-dev-8651e1d6572bc2c061073f05fabcd7175789259d.tar.gz
apparmor: make free_profile available outside of policy.c
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/policy.c')
-rw-r--r--security/apparmor/policy.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
index aee2e71..7a80b0c 100644
--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -307,7 +307,6 @@ fail_ns:
return NULL;
}
-static void free_profile(struct aa_profile *profile);
/**
* free_namespace - free a profile namespace
* @ns: the namespace to free (MAYBE NULL)
@@ -324,7 +323,7 @@ static void free_namespace(struct aa_namespace *ns)
aa_put_namespace(ns->parent);
ns->unconfined->ns = NULL;
- free_profile(ns->unconfined);
+ aa_free_profile(ns->unconfined);
kzfree(ns);
}
@@ -568,7 +567,7 @@ void aa_free_replacedby_kref(struct kref *kref)
}
/**
- * free_profile - free a profile
+ * aa_free_profile - free a profile
* @profile: the profile to free (MAYBE NULL)
*
* Free a profile, its hats and null_profile. All references to the profile,
@@ -577,7 +576,7 @@ void aa_free_replacedby_kref(struct kref *kref)
* If the profile was referenced from a task context, free_profile() will
* be called from an rcu callback routine, so we must not sleep here.
*/
-static void free_profile(struct aa_profile *profile)
+void aa_free_profile(struct aa_profile *profile)
{
AA_DEBUG("%s(%p)\n", __func__, profile);
@@ -612,7 +611,7 @@ static void aa_free_profile_rcu(struct rcu_head *head)
if (p->flags & PFLAG_NS_COUNT)
free_namespace(p->ns);
else
- free_profile(p);
+ aa_free_profile(p);
}
/**
OpenPOWER on IntegriCloud