aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/tomoyo/common.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c
index 2e2802060eef..365f3bddee79 100644
--- a/security/tomoyo/common.c
+++ b/security/tomoyo/common.c
@@ -984,14 +984,12 @@ static bool tomoyo_select_domain(struct tomoyo_io_buffer *head,
984 (global_pid = true, sscanf(data, "global-pid=%u", &pid) == 1)) { 984 (global_pid = true, sscanf(data, "global-pid=%u", &pid) == 1)) {
985 struct task_struct *p; 985 struct task_struct *p;
986 rcu_read_lock(); 986 rcu_read_lock();
987 read_lock(&tasklist_lock);
988 if (global_pid) 987 if (global_pid)
989 p = find_task_by_pid_ns(pid, &init_pid_ns); 988 p = find_task_by_pid_ns(pid, &init_pid_ns);
990 else 989 else
991 p = find_task_by_vpid(pid); 990 p = find_task_by_vpid(pid);
992 if (p) 991 if (p)
993 domain = tomoyo_real_domain(p); 992 domain = tomoyo_real_domain(p);
994 read_unlock(&tasklist_lock);
995 rcu_read_unlock(); 993 rcu_read_unlock();
996 } else if (!strncmp(data, "domain=", 7)) { 994 } else if (!strncmp(data, "domain=", 7)) {
997 if (tomoyo_domain_def(data + 7)) 995 if (tomoyo_domain_def(data + 7))
@@ -1664,14 +1662,12 @@ static void tomoyo_read_pid(struct tomoyo_io_buffer *head)
1664 global_pid = true; 1662 global_pid = true;
1665 pid = (unsigned int) simple_strtoul(buf, NULL, 10); 1663 pid = (unsigned int) simple_strtoul(buf, NULL, 10);
1666 rcu_read_lock(); 1664 rcu_read_lock();
1667 read_lock(&tasklist_lock);
1668 if (global_pid) 1665 if (global_pid)
1669 p = find_task_by_pid_ns(pid, &init_pid_ns); 1666 p = find_task_by_pid_ns(pid, &init_pid_ns);
1670 else 1667 else
1671 p = find_task_by_vpid(pid); 1668 p = find_task_by_vpid(pid);
1672 if (p) 1669 if (p)
1673 domain = tomoyo_real_domain(p); 1670 domain = tomoyo_real_domain(p);
1674 read_unlock(&tasklist_lock);
1675 rcu_read_unlock(); 1671 rcu_read_unlock();
1676 if (!domain) 1672 if (!domain)
1677 return; 1673 return;