[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171213132255.6a2013be@alans-desktop>
Date: Wed, 13 Dec 2017 13:22:55 +0000
From: Alan Cox <gnomes@...rguk.ukuu.org.uk>
To: kpark3469@...il.com
Cc: linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
jslaby@...e.com, keun-o.park@...kmatter.ae
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
Powered by blists - more mailing lists