diff options
Diffstat (limited to 'security/tomoyo/memory.c')
-rw-r--r-- | security/tomoyo/memory.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/security/tomoyo/memory.c b/security/tomoyo/memory.c index 7a56051146c2..277b9ade4408 100644 --- a/security/tomoyo/memory.c +++ b/security/tomoyo/memory.c | |||
@@ -123,7 +123,8 @@ struct tomoyo_group *tomoyo_get_group(struct tomoyo_acl_param *param, | |||
123 | goto out; | 123 | goto out; |
124 | list = ¶m->ns->group_list[idx]; | 124 | list = ¶m->ns->group_list[idx]; |
125 | list_for_each_entry(group, list, head.list) { | 125 | list_for_each_entry(group, list, head.list) { |
126 | if (e.group_name != group->group_name) | 126 | if (e.group_name != group->group_name || |
127 | atomic_read(&group->head.users) == TOMOYO_GC_IN_PROGRESS) | ||
127 | continue; | 128 | continue; |
128 | atomic_inc(&group->head.users); | 129 | atomic_inc(&group->head.users); |
129 | found = true; | 130 | found = true; |
@@ -175,7 +176,8 @@ const struct tomoyo_path_info *tomoyo_get_name(const char *name) | |||
175 | if (mutex_lock_interruptible(&tomoyo_policy_lock)) | 176 | if (mutex_lock_interruptible(&tomoyo_policy_lock)) |
176 | return NULL; | 177 | return NULL; |
177 | list_for_each_entry(ptr, head, head.list) { | 178 | list_for_each_entry(ptr, head, head.list) { |
178 | if (hash != ptr->entry.hash || strcmp(name, ptr->entry.name)) | 179 | if (hash != ptr->entry.hash || strcmp(name, ptr->entry.name) || |
180 | atomic_read(&ptr->head.users) == TOMOYO_GC_IN_PROGRESS) | ||
179 | continue; | 181 | continue; |
180 | atomic_inc(&ptr->head.users); | 182 | atomic_inc(&ptr->head.users); |
181 | goto out; | 183 | goto out; |