diff options
author | John Johansen <john.johansen@canonical.com> | 2017-01-16 11:42:32 +0300 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2017-01-16 12:18:27 +0300 |
commit | 5fd1b95fc9b96629d185f5fe3d9342fcff78eb30 (patch) | |
tree | 2a3f3a41dec9374a673015eb1f66c5818f2dc921 /security | |
parent | d102d895713c736fd13e21feaab38b52d8ab32ad (diff) | |
download | linux-5fd1b95fc9b96629d185f5fe3d9342fcff78eb30.tar.xz |
apparmor: update policy_destroy to use new debug asserts
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/lib.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c index bcd598c7ca9d..5d8ef31a60f1 100644 --- a/security/apparmor/lib.c +++ b/security/apparmor/lib.c @@ -197,15 +197,8 @@ bool aa_policy_init(struct aa_policy *policy, const char *prefix, */ void aa_policy_destroy(struct aa_policy *policy) { - /* still contains profiles -- invalid */ - if (on_list_rcu(&policy->profiles)) { - AA_ERROR("%s: internal error, policy '%s' contains profiles\n", - __func__, policy->name); - } - if (on_list_rcu(&policy->list)) { - AA_ERROR("%s: internal error, policy '%s' still on list\n", - __func__, policy->name); - } + AA_BUG(on_list_rcu(&policy->profiles)); + AA_BUG(on_list_rcu(&policy->list)); /* don't free name as its a subset of hname */ kzfree(policy->hname); |