diff options
Diffstat (limited to 'security/tomoyo/number_group.c')
-rw-r--r-- | security/tomoyo/number_group.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/security/tomoyo/number_group.c b/security/tomoyo/number_group.c index eca20d6f4e8..99694153b94 100644 --- a/security/tomoyo/number_group.c +++ b/security/tomoyo/number_group.c @@ -7,9 +7,6 @@ #include <linux/slab.h> #include "common.h" -/* The list for "struct tomoyo_number_group". */ -LIST_HEAD(tomoyo_number_group_list); - /** * tomoyo_get_group - Allocate memory for "struct tomoyo_number_group". * @@ -32,7 +29,8 @@ struct tomoyo_group *tomoyo_get_number_group(const char *group_name) entry = kzalloc(sizeof(*entry), GFP_NOFS); if (mutex_lock_interruptible(&tomoyo_policy_lock)) goto out; - list_for_each_entry_rcu(group, &tomoyo_number_group_list, list) { + list_for_each_entry_rcu(group, &tomoyo_group_list[TOMOYO_NUMBER_GROUP], + list) { if (saved_group_name != group->group_name) continue; atomic_inc(&group->users); @@ -44,7 +42,8 @@ struct tomoyo_group *tomoyo_get_number_group(const char *group_name) entry->group_name = saved_group_name; saved_group_name = NULL; atomic_set(&entry->users, 1); - list_add_tail_rcu(&entry->list, &tomoyo_number_group_list); + list_add_tail_rcu(&entry->list, + &tomoyo_group_list[TOMOYO_NUMBER_GROUP]); group = entry; entry = NULL; error = 0; @@ -110,7 +109,8 @@ bool tomoyo_read_number_group_policy(struct tomoyo_io_buffer *head) { struct list_head *gpos; struct list_head *mpos; - list_for_each_cookie(gpos, head->read_var1, &tomoyo_number_group_list) { + list_for_each_cookie(gpos, head->read_var1, + &tomoyo_group_list[TOMOYO_NUMBER_GROUP]) { struct tomoyo_group *group; const char *name; group = list_entry(gpos, struct tomoyo_group, list); |