summaryrefslogtreecommitdiff
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2003-02-09 00:59:53 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-02-09 00:59:53 -0800
commite2e6adf5a135aeddf389174473984b7b61582c68 (patch)
tree6e66aedefa9469030c885654c4bcb8e1b8f896aa /kernel/sys.c
parent8397990bbd169416439f86e567d8fe130250c91f (diff)
[PATCH] Lock session and group ID setting
- session-IDs and group-IDs are set outside the tasklist lock. This causes breakage in the USB code. The correct fix is to do this: I introduced the bug with the new pidhash.
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 10c8db1c887b..9404304eba74 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1021,16 +1021,7 @@ asmlinkage long sys_setsid(void)
goto out;
current->leader = 1;
- if (current->session != current->pid) {
- detach_pid(current, PIDTYPE_SID);
- current->session = current->pid;
- attach_pid(current, PIDTYPE_SID, current->pid);
- }
- if (current->pgrp != current->pid) {
- detach_pid(current, PIDTYPE_PGID);
- current->pgrp = current->pid;
- attach_pid(current, PIDTYPE_PGID, current->pid);
- }
+ __set_special_pids(current->pid, current->pid);
current->tty = NULL;
current->tty_old_pgrp = 0;
err = current->pgrp;