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 eca20d6f4e8b..99694153b947 100644 --- a/security/tomoyo/number_group.c +++ b/security/tomoyo/number_group.c | |||
@@ -7,9 +7,6 @@ | |||
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | #include "common.h" | 8 | #include "common.h" |
9 | 9 | ||
10 | /* The list for "struct tomoyo_number_group". */ | ||
11 | LIST_HEAD(tomoyo_number_group_list); | ||
12 | |||
13 | /** | 10 | /** |
14 | * tomoyo_get_group - Allocate memory for "struct tomoyo_number_group". | 11 | * tomoyo_get_group - Allocate memory for "struct tomoyo_number_group". |
15 | * | 12 | * |
@@ -32,7 +29,8 @@ struct tomoyo_group *tomoyo_get_number_group(const char *group_name) | |||
32 | entry = kzalloc(sizeof(*entry), GFP_NOFS); | 29 | entry = kzalloc(sizeof(*entry), GFP_NOFS); |
33 | if (mutex_lock_interruptible(&tomoyo_policy_lock)) | 30 | if (mutex_lock_interruptible(&tomoyo_policy_lock)) |
34 | goto out; | 31 | goto out; |
35 | list_for_each_entry_rcu(group, &tomoyo_number_group_list, list) { | 32 | list_for_each_entry_rcu(group, &tomoyo_group_list[TOMOYO_NUMBER_GROUP], |
33 | list) { | ||
36 | if (saved_group_name != group->group_name) | 34 | if (saved_group_name != group->group_name) |
37 | continue; | 35 | continue; |
38 | atomic_inc(&group->users); | 36 | atomic_inc(&group->users); |
@@ -44,7 +42,8 @@ struct tomoyo_group *tomoyo_get_number_group(const char *group_name) | |||
44 | entry->group_name = saved_group_name; | 42 | entry->group_name = saved_group_name; |
45 | saved_group_name = NULL; | 43 | saved_group_name = NULL; |
46 | atomic_set(&entry->users, 1); | 44 | atomic_set(&entry->users, 1); |
47 | list_add_tail_rcu(&entry->list, &tomoyo_number_group_list); | 45 | list_add_tail_rcu(&entry->list, |
46 | &tomoyo_group_list[TOMOYO_NUMBER_GROUP]); | ||
48 | group = entry; | 47 | group = entry; |
49 | entry = NULL; | 48 | entry = NULL; |
50 | error = 0; | 49 | error = 0; |
@@ -110,7 +109,8 @@ bool tomoyo_read_number_group_policy(struct tomoyo_io_buffer *head) | |||
110 | { | 109 | { |
111 | struct list_head *gpos; | 110 | struct list_head *gpos; |
112 | struct list_head *mpos; | 111 | struct list_head *mpos; |
113 | list_for_each_cookie(gpos, head->read_var1, &tomoyo_number_group_list) { | 112 | list_for_each_cookie(gpos, head->read_var1, |
113 | &tomoyo_group_list[TOMOYO_NUMBER_GROUP]) { | ||
114 | struct tomoyo_group *group; | 114 | struct tomoyo_group *group; |
115 | const char *name; | 115 | const char *name; |
116 | group = list_entry(gpos, struct tomoyo_group, list); | 116 | group = list_entry(gpos, struct tomoyo_group, list); |