Re: [PATCH] tty: Fix WARNING in tty_set_termios

2019-01-31 Thread shuah
On 1/31/19 8:33 AM, Johan Hovold wrote: On Thu, Jan 31, 2019 at 04:18:33PM +0100, Marcel Holtmann wrote: I agree with Al that this change doesn't make much sense. The WARN_ON is there to catch any bugs leading to the termios being changed for a master side pty. Those should bugs should be fixed

Re: [PATCH] tty: Fix WARNING in tty_set_termios

2019-01-31 Thread Johan Hovold
On Thu, Jan 31, 2019 at 04:18:33PM +0100, Marcel Holtmann wrote: > > I agree with Al that this change doesn't make much sense. The WARN_ON > > is there to catch any bugs leading to the termios being changed for a > > master side pty. Those should bugs should be fixed, and not worked > > around in

Re: [PATCH] tty: Fix WARNING in tty_set_termios

2019-01-31 Thread Marcel Holtmann
Hi Johan, >>> On Fri, Jan 25, 2019 at 04:29:05PM -0700, Shuah Khan wrote: tty_set_termios() has the following WARMN_ON which can be triggered with a syscall to invoke TIOCGETD __NR_ioctl. > > You meant TIOCSETD here, and in fact its the call which sets the uart > protocol that triggers

Re: [PATCH] tty: Fix WARNING in tty_set_termios

2019-01-30 Thread shuah
On 1/30/19 3:32 AM, Johan Hovold wrote: On Mon, Jan 28, 2019 at 02:29:22PM -0700, shuah wrote: On 1/25/19 9:14 PM, Al Viro wrote: On Fri, Jan 25, 2019 at 04:29:05PM -0700, Shuah Khan wrote: tty_set_termios() has the following WARMN_ON which can be triggered with a syscall to invoke TIOCGETD __

Re: [PATCH] tty: Fix WARNING in tty_set_termios

2019-01-30 Thread Johan Hovold
On Mon, Jan 28, 2019 at 02:29:22PM -0700, shuah wrote: > On 1/25/19 9:14 PM, Al Viro wrote: > > On Fri, Jan 25, 2019 at 04:29:05PM -0700, Shuah Khan wrote: > >> tty_set_termios() has the following WARMN_ON which can be triggered with a > >> syscall to invoke TIOCGETD __NR_ioctl. You meant TIOCSETD

Re: [PATCH] tty: Fix WARNING in tty_set_termios

2019-01-28 Thread shuah
On 1/25/19 9:14 PM, Al Viro wrote: On Fri, Jan 25, 2019 at 04:29:05PM -0700, Shuah Khan wrote: tty_set_termios() has the following WARMN_ON which can be triggered with a syscall to invoke TIOCGETD __NR_ioctl. WARN_ON(tty->driver->type == TTY_DRIVER_TYPE_PTY && tty->driver->subt

Re: [PATCH] tty: Fix WARNING in tty_set_termios

2019-01-25 Thread Al Viro
On Fri, Jan 25, 2019 at 04:29:05PM -0700, Shuah Khan wrote: > tty_set_termios() has the following WARMN_ON which can be triggered with a > syscall to invoke TIOCGETD __NR_ioctl. > > WARN_ON(tty->driver->type == TTY_DRIVER_TYPE_PTY && > tty->driver->subtype == PTY_TYPE_MASTER); > Re

[PATCH] tty: Fix WARNING in tty_set_termios

2019-01-25 Thread Shuah Khan
tty_set_termios() has the following WARMN_ON which can be triggered with a syscall to invoke TIOCGETD __NR_ioctl. WARN_ON(tty->driver->type == TTY_DRIVER_TYPE_PTY && tty->driver->subtype == PTY_TYPE_MASTER); Reference: https://syzkaller.appspot.com/bug?id=2410d22f1d8e5984217329dd0