[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwYps=q14pQ04yWYThFwi3NnR__MeggU8N3M4Q0vrk+nQ@mail.gmail.com>
Date: Tue, 19 Nov 2013 16:21:54 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Peter Hurley <peter@...leysoftware.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mikael Pettersson <mikpelinux@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-serial@...r.kernel.org, "# .39.x" <stable@...nel.org>
Subject: Re: [PATCH] n_tty: Ensure reader restarts worker for next reader
Greg,
what happened to this patch? Is it still waiting in some random tree
of yours, or did it get lost?
Linus
On Thu, Nov 7, 2013 at 10:59 AM, Peter Hurley <peter@...leysoftware.com> wrote:
> A departing reader must restart a flush_to_ldisc() worker _before_
> the next reader enters the read loop; this is to avoid the new reader
> concluding no more i/o is available and prematurely exiting, when the
> old reader simply hasn't re-started the worker yet.
>
> Cc: stable@...nel.org # 3.12
> Signed-off-by: Peter Hurley <peter@...leysoftware.com>
> ---
> drivers/tty/n_tty.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
> index 7a744b6..ce11cd5 100644
> --- a/drivers/tty/n_tty.c
> +++ b/drivers/tty/n_tty.c
> @@ -2250,6 +2250,9 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
> if (time)
> timeout = time;
> }
> + n_tty_set_room(tty);
> + up_read(&tty->termios_rwsem);
> +
> mutex_unlock(&ldata->atomic_read_lock);
> remove_wait_queue(&tty->read_wait, &wait);
>
> @@ -2260,8 +2263,6 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
> if (b - buf)
> retval = b - buf;
>
> - n_tty_set_room(tty);
> - up_read(&tty->termios_rwsem);
> return retval;
> }
>
> --
> 1.8.1.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists