summaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-10-13 11:37:26 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 18:51:40 +0200
commit9c9f4ded90a59eee84e15f5fd38c03d60184e112 (patch)
tree925a7f7c30136477b3f8551123fd86b355fd60fb /kernel/sys.c
parentpps: Reserve a line discipline number for PPS (diff)
downloadlinux-9c9f4ded90a59eee84e15f5fd38c03d60184e112.tar.xz
linux-9c9f4ded90a59eee84e15f5fd38c03d60184e112.zip
tty: Add a kref count
Introduce a kref to the tty structure and use it to protect the tty->signal tty references. For now we don't introduce it for anything else. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 038a7bc0901d..234d9454294e 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1060,9 +1060,7 @@ asmlinkage long sys_setsid(void)
group_leader->signal->leader = 1;
__set_special_pids(sid);
- spin_lock(&group_leader->sighand->siglock);
- group_leader->signal->tty = NULL;
- spin_unlock(&group_leader->sighand->siglock);
+ proc_clear_tty(group_leader);
err = session;
out: