Messages in this thread | | | Date | Wed, 13 Dec 2017 13:22:55 +0000 | From | Alan Cox <> | Subject | Re: [PATCH] pty: cancel pty slave port buf's work in tty_release |
| |
> diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c > index dc60aee..a6ca634 100644 > --- a/drivers/tty/tty_io.c > +++ b/drivers/tty/tty_io.c > @@ -1476,6 +1476,8 @@ static void release_tty(struct tty_struct *tty, int idx) > if (tty->link) > tty->link->port->itty = NULL; > tty_buffer_cancel_work(tty->port); > + if (tty->link) > + tty_buffer_cancel_work(tty->link->port); > > tty_kref_put(tty->link); > tty_kref_put(tty);
This looks correct to me, but I do worry about deadlock cases we may be adding.
Alan
| |