Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84668
b: refs/heads/master
c: ac9a8e3
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Feb 8, 2008
1 parent 69bdfc8 commit 86bcebe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44c4e1b2581f7273ab14ef30b6430618801c57b1
refs/heads/master: ac9a8e3f0f43d20fc316162e8e5f9186d295ff49
11 changes: 4 additions & 7 deletions trunk/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,19 +1025,16 @@ asmlinkage long sys_getsid(pid_t pid)
else {
int retval;
struct task_struct *p;
struct pid_namespace *ns;

ns = current->nsproxy->pid_ns;

read_lock(&tasklist_lock);
p = find_task_by_pid_ns(pid, ns);
rcu_read_lock();
p = find_task_by_vpid(pid);
retval = -ESRCH;
if (p) {
retval = security_task_getsid(p);
if (!retval)
retval = task_session_nr_ns(p, ns);
retval = task_session_vnr(p);
}
read_unlock(&tasklist_lock);
rcu_read_unlock();
return retval;
}
}
Expand Down

0 comments on commit 86bcebe

Please sign in to comment.