diff options
Diffstat (limited to 'security/tomoyo/common.c')
-rw-r--r-- | security/tomoyo/common.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c index ddfb9cccf468..a42fe02c6144 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c | |||
@@ -866,7 +866,6 @@ static struct tomoyo_profile *tomoyo_find_or_assign_new_profile(const unsigned | |||
866 | 866 | ||
867 | if (profile >= TOMOYO_MAX_PROFILES) | 867 | if (profile >= TOMOYO_MAX_PROFILES) |
868 | return NULL; | 868 | return NULL; |
869 | /***** EXCLUSIVE SECTION START *****/ | ||
870 | mutex_lock(&lock); | 869 | mutex_lock(&lock); |
871 | ptr = tomoyo_profile_ptr[profile]; | 870 | ptr = tomoyo_profile_ptr[profile]; |
872 | if (ptr) | 871 | if (ptr) |
@@ -880,7 +879,6 @@ static struct tomoyo_profile *tomoyo_find_or_assign_new_profile(const unsigned | |||
880 | tomoyo_profile_ptr[profile] = ptr; | 879 | tomoyo_profile_ptr[profile] = ptr; |
881 | ok: | 880 | ok: |
882 | mutex_unlock(&lock); | 881 | mutex_unlock(&lock); |
883 | /***** EXCLUSIVE SECTION END *****/ | ||
884 | return ptr; | 882 | return ptr; |
885 | } | 883 | } |
886 | 884 | ||
@@ -1050,7 +1048,6 @@ static int tomoyo_update_manager_entry(const char *manager, | |||
1050 | saved_manager = tomoyo_save_name(manager); | 1048 | saved_manager = tomoyo_save_name(manager); |
1051 | if (!saved_manager) | 1049 | if (!saved_manager) |
1052 | return -ENOMEM; | 1050 | return -ENOMEM; |
1053 | /***** EXCLUSIVE SECTION START *****/ | ||
1054 | down_write(&tomoyo_policy_manager_list_lock); | 1051 | down_write(&tomoyo_policy_manager_list_lock); |
1055 | list_for_each_entry(ptr, &tomoyo_policy_manager_list, list) { | 1052 | list_for_each_entry(ptr, &tomoyo_policy_manager_list, list) { |
1056 | if (ptr->manager != saved_manager) | 1053 | if (ptr->manager != saved_manager) |
@@ -1072,7 +1069,6 @@ static int tomoyo_update_manager_entry(const char *manager, | |||
1072 | error = 0; | 1069 | error = 0; |
1073 | out: | 1070 | out: |
1074 | up_write(&tomoyo_policy_manager_list_lock); | 1071 | up_write(&tomoyo_policy_manager_list_lock); |
1075 | /***** EXCLUSIVE SECTION END *****/ | ||
1076 | return error; | 1072 | return error; |
1077 | } | 1073 | } |
1078 | 1074 | ||
@@ -1197,13 +1193,11 @@ static bool tomoyo_is_select_one(struct tomoyo_io_buffer *head, | |||
1197 | 1193 | ||
1198 | if (sscanf(data, "pid=%u", &pid) == 1) { | 1194 | if (sscanf(data, "pid=%u", &pid) == 1) { |
1199 | struct task_struct *p; | 1195 | struct task_struct *p; |
1200 | /***** CRITICAL SECTION START *****/ | ||
1201 | read_lock(&tasklist_lock); | 1196 | read_lock(&tasklist_lock); |
1202 | p = find_task_by_vpid(pid); | 1197 | p = find_task_by_vpid(pid); |
1203 | if (p) | 1198 | if (p) |
1204 | domain = tomoyo_real_domain(p); | 1199 | domain = tomoyo_real_domain(p); |
1205 | read_unlock(&tasklist_lock); | 1200 | read_unlock(&tasklist_lock); |
1206 | /***** CRITICAL SECTION END *****/ | ||
1207 | } else if (!strncmp(data, "domain=", 7)) { | 1201 | } else if (!strncmp(data, "domain=", 7)) { |
1208 | if (tomoyo_is_domain_def(data + 7)) { | 1202 | if (tomoyo_is_domain_def(data + 7)) { |
1209 | down_read(&tomoyo_domain_list_lock); | 1203 | down_read(&tomoyo_domain_list_lock); |
@@ -1594,13 +1588,11 @@ static int tomoyo_read_pid(struct tomoyo_io_buffer *head) | |||
1594 | const int pid = head->read_step; | 1588 | const int pid = head->read_step; |
1595 | struct task_struct *p; | 1589 | struct task_struct *p; |
1596 | struct tomoyo_domain_info *domain = NULL; | 1590 | struct tomoyo_domain_info *domain = NULL; |
1597 | /***** CRITICAL SECTION START *****/ | ||
1598 | read_lock(&tasklist_lock); | 1591 | read_lock(&tasklist_lock); |
1599 | p = find_task_by_vpid(pid); | 1592 | p = find_task_by_vpid(pid); |
1600 | if (p) | 1593 | if (p) |
1601 | domain = tomoyo_real_domain(p); | 1594 | domain = tomoyo_real_domain(p); |
1602 | read_unlock(&tasklist_lock); | 1595 | read_unlock(&tasklist_lock); |
1603 | /***** CRITICAL SECTION END *****/ | ||
1604 | if (domain) | 1596 | if (domain) |
1605 | tomoyo_io_printf(head, "%d %u %s", pid, domain->profile, | 1597 | tomoyo_io_printf(head, "%d %u %s", pid, domain->profile, |
1606 | domain->domainname->name); | 1598 | domain->domainname->name); |