Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tty: TIOCGSOFTCAR/SSOFTCAR on pty is wron

The termios settings ioctls on a pty should affect the bound tty side not
the pty. The SOFTCAR ioctls use the wrong device file.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
f753f327 325a9a3d

+4 -2
+4 -2
drivers/char/tty_ioctl.c
··· 937 937 return 0; 938 938 #endif 939 939 case TIOCGSOFTCAR: 940 - return put_user(C_CLOCAL(tty) ? 1 : 0, 940 + /* FIXME: for correctness we may need to take the termios 941 + lock here - review */ 942 + return put_user(C_CLOCAL(real_tty) ? 1 : 0, 941 943 (int __user *)arg); 942 944 case TIOCSSOFTCAR: 943 945 if (get_user(arg, (unsigned int __user *) arg)) 944 946 return -EFAULT; 945 - return tty_change_softcar(tty, arg); 947 + return tty_change_softcar(real_tty, arg); 946 948 default: 947 949 return -ENOIOCTLCMD; 948 950 }