diff options
Diffstat (limited to 'security/apparmor/policy.c')
-rw-r--r-- | security/apparmor/policy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c index ca402d028db8..780712553651 100644 --- a/security/apparmor/policy.c +++ b/security/apparmor/policy.c | |||
@@ -766,7 +766,9 @@ struct aa_profile *aa_find_child(struct aa_profile *parent, const char *name) | |||
766 | struct aa_profile *profile; | 766 | struct aa_profile *profile; |
767 | 767 | ||
768 | rcu_read_lock(); | 768 | rcu_read_lock(); |
769 | profile = aa_get_profile(__find_child(&parent->base.profiles, name)); | 769 | do { |
770 | profile = __find_child(&parent->base.profiles, name); | ||
771 | } while (profile && !aa_get_profile_not0(profile)); | ||
770 | rcu_read_unlock(); | 772 | rcu_read_unlock(); |
771 | 773 | ||
772 | /* refcount released by caller */ | 774 | /* refcount released by caller */ |