public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: kpark3469@gmail.com
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	jslaby@suse.com, keun-o.park@darkmatter.ae
Subject: Re: [PATCH] pty: cancel pty slave port buf's work in tty_release
Date: Wed, 13 Dec 2017 13:22:55 +0000	[thread overview]
Message-ID: <20171213132255.6a2013be@alans-desktop> (raw)
In-Reply-To: <1513141848-15124-1-git-send-email-kpark3469@gmail.com>

> 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

      parent reply	other threads:[~2017-12-13 13:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13  5:10 [PATCH] pty: cancel pty slave port buf's work in tty_release kpark3469
2017-12-13  8:23 ` Greg KH
2017-12-13 12:36   ` Keun-O Park
2017-12-13 13:22 ` Alan Cox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171213132255.6a2013be@alans-desktop \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=keun-o.park@darkmatter.ae \
    --cc=kpark3469@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox