mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
216ba023a9
commit
2cb5998b5f
3 changed files with 21 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue