Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184926
b: refs/heads/master
c: 1fcdc7c
h: refs/heads/master
v: v3
  • Loading branch information
Tetsuo Handa authored and James Morris committed Feb 25, 2010
1 parent ffa590f commit 16e54f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 189b3b1c89761054fee3438f063d7f257306e2d8
refs/heads/master: 1fcdc7c527010b144d3951f9ce25faedf264933c
4 changes: 4 additions & 0 deletions trunk/security/tomoyo/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1232,11 +1232,13 @@ static bool tomoyo_is_select_one(struct tomoyo_io_buffer *head,

if (sscanf(data, "pid=%u", &pid) == 1) {
struct task_struct *p;
rcu_read_lock();
read_lock(&tasklist_lock);
p = find_task_by_vpid(pid);
if (p)
domain = tomoyo_real_domain(p);
read_unlock(&tasklist_lock);
rcu_read_unlock();
} else if (!strncmp(data, "domain=", 7)) {
if (tomoyo_is_domain_def(data + 7))
domain = tomoyo_find_domain(data + 7);
Expand Down Expand Up @@ -1635,11 +1637,13 @@ static int tomoyo_read_pid(struct tomoyo_io_buffer *head)
const int pid = head->read_step;
struct task_struct *p;
struct tomoyo_domain_info *domain = NULL;
rcu_read_lock();
read_lock(&tasklist_lock);
p = find_task_by_vpid(pid);
if (p)
domain = tomoyo_real_domain(p);
read_unlock(&tasklist_lock);
rcu_read_unlock();
if (domain)
tomoyo_io_printf(head, "%d %u %s", pid, domain->profile,
domain->domainname->name);
Expand Down

0 comments on commit 16e54f4

Please sign in to comment.