Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84662
b: refs/heads/master
c: 430c623
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Feb 8, 2008
1 parent 45917d6 commit bdf52fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 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: 297bd42b15daed02453ff59ce6d31216a58b0398
refs/heads/master: 430c623121ea88ca80595c99fdc63b7f8a803ae5
1 change: 0 additions & 1 deletion trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,6 @@ static int __init kernel_init(void * unused)
*/
init_pid_ns.child_reaper = current;

__set_special_pids(task_pid(current));
cad_pid = task_pid(current);

smp_prepare_cpus(setup_max_cpus);
Expand Down
9 changes: 4 additions & 5 deletions trunk/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,12 +1054,11 @@ asmlinkage long sys_setsid(void)
if (group_leader->signal->leader)
goto out;

/* Fail if a process group id already exists that equals the proposed
* session id.
/* Fail if a process group id already exists that equals the
* proposed session id.
*
* Don't check if session == 1 because kernel threads and CLONE_NEWPID
* tasks use this session id and so the check will always fail and make
* it so init cannot successfully call setsid.
* Don't check if session == 1, clone(CLONE_NEWPID) creates
* this group/session beforehand.
*/
if (session != 1 && pid_task(sid, PIDTYPE_PGID))
goto out;
Expand Down

0 comments on commit bdf52fd

Please sign in to comment.