summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-10-13 11:40:30 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 18:51:41 +0200
commit2cb5998b5f0ccc886fdda3509059eef297b49577 (patch)
tree9113731d3f892c2e164bfd05a7cf1a4b1713a619 /fs
parentmxser: Switch to kref tty (diff)
downloadlinux-2cb5998b5f0ccc886fdda3509059eef297b49577.tar.xz
linux-2cb5998b5f0ccc886fdda3509059eef297b49577.zip
tty: the vhangup syscall is racy
We now have the infrastructure to sort this out but rather than teaching the syscall tty lock rules we move the hard work into a tty helper Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/open.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/open.c b/fs/open.c
index 07da9359481c..5596049863bf 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -1141,8 +1141,7 @@ EXPORT_SYMBOL(sys_close);
asmlinkage long sys_vhangup(void)
{
if (capable(CAP_SYS_TTY_CONFIG)) {
- /* XXX: this needs locking */
- tty_vhangup(current->signal->tty);
+ tty_vhangup_self();
return 0;
}
return -EPERM;