diff options
Diffstat (limited to 'security/tomoyo/number_group.c')
-rw-r--r-- | security/tomoyo/number_group.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/security/tomoyo/number_group.c b/security/tomoyo/number_group.c index 8d6ef8f006f..afc5b697212 100644 --- a/security/tomoyo/number_group.c +++ b/security/tomoyo/number_group.c @@ -84,10 +84,10 @@ int tomoyo_write_number_group_policy(char *data, const bool is_delete) return -ENOMEM; if (mutex_lock_interruptible(&tomoyo_policy_lock)) goto out; - list_for_each_entry_rcu(member, &group->member_list, list) { + list_for_each_entry_rcu(member, &group->member_list, head.list) { if (memcmp(&member->number, &e.number, sizeof(e.number))) continue; - member->is_deleted = is_delete; + member->head.is_deleted = is_delete; error = 0; break; } @@ -95,7 +95,8 @@ int tomoyo_write_number_group_policy(char *data, const bool is_delete) struct tomoyo_number_group_member *entry = tomoyo_commit_ok(&e, sizeof(e)); if (entry) { - list_add_tail_rcu(&entry->list, &group->member_list); + list_add_tail_rcu(&entry->head.list, + &group->member_list); error = 0; } } @@ -129,8 +130,8 @@ bool tomoyo_read_number_group_policy(struct tomoyo_io_buffer *head) const struct tomoyo_number_group_member *member = list_entry(mpos, struct tomoyo_number_group_member, - list); - if (member->is_deleted) + head.list); + if (member->head.is_deleted) continue; pos = head->read_avail; if (!tomoyo_io_printf(head, TOMOYO_KEYWORD_NUMBER_GROUP @@ -162,8 +163,8 @@ bool tomoyo_number_matches_group(const unsigned long min, { struct tomoyo_number_group_member *member; bool matched = false; - list_for_each_entry_rcu(member, &group->member_list, list) { - if (member->is_deleted) + list_for_each_entry_rcu(member, &group->member_list, head.list) { + if (member->head.is_deleted) continue; if (min > member->number.values[1] || max < member->number.values[0]) |