diff options
Diffstat (limited to 'security/apparmor/policy.c')
-rw-r--r-- | security/apparmor/policy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c index 6172509fa2b7..345bec07a27d 100644 --- a/security/apparmor/policy.c +++ b/security/apparmor/policy.c | |||
@@ -563,7 +563,8 @@ void __init aa_free_root_ns(void) | |||
563 | static void free_replacedby(struct aa_replacedby *r) | 563 | static void free_replacedby(struct aa_replacedby *r) |
564 | { | 564 | { |
565 | if (r) { | 565 | if (r) { |
566 | aa_put_profile(rcu_dereference(r->profile)); | 566 | /* r->profile will not be updated any more as r is dead */ |
567 | aa_put_profile(rcu_dereference_protected(r->profile, true)); | ||
567 | kzfree(r); | 568 | kzfree(r); |
568 | } | 569 | } |
569 | } | 570 | } |