Re: [PATCH 12/12] tty: move the handling of the tty release logic

Yinghai Lu
2012-08-01T00:47:50Z

On Fri, Jun 22, 2012 at 8:47 AM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> Now that we don't have tty->termios tied to drivers->tty we can untangle
> the logic here. In addition we can push the removal logic out of the
> destructor path.
>
> At that point we can think about sorting out tty_port and console and all
> the other ugly hangovers.
>
> An important other property we now have is that the tty mutex does now cover
> the drivers array. An assumption other bits of the code made and which is
> necessary for the tty lock patch.
>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> ---
>
> drivers/tty/pty.c | 8 --------
> drivers/tty/tty_io.c | 16 +++++-----------
> drivers/tty/vt/vt.c | 1 -
> drivers/usb/serial/usb-serial.c | 3 +--
> include/linux/tty.h | 1 -
> include/linux/tty_driver.h | 11 +++--------
> 6 files changed, 9 insertions(+), 31 deletions(-)

Hi, Alan

This one cause regression on my test setup.

that setup is booting from pxe and initrd is updated from opensuse
11.3 rescue disk.

kernel has command line 115200, and later serial console will use
115200 automatically.

but with this one, serial console will switch back to 9600 instead.

bisect said:

36b3c070d2346c890d690d71f6eab02f8c511137 is the first bad commit
commit 36b3c070d2346c890d690d71f6eab02f8c511137
Author: Alan Cox <alan@linux.intel.com>
Date: Tue Jul 17 17:06:57 2012 +0100

tty: Move the handling of the tty release logic

Now that we don't have tty->termios tied to drivers->tty we can untangle
the logic here. In addition we can push the removal logic out of the
destructor path.

At that point we can think about sorting out tty_port and console and all
the other ugly hangovers.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

:040000 040000 44db8111f7e5be2f60ae2b41328108a6e533f8a4
d0af41e84b2657e308a92e2ebad04ea5594e6bb4 M drivers
:040000 040000 f75618c564287072c6a6a9d5462355ab780b06b8
4606b8b123694a2e8aaf1d3708fda66bda843742 M include