From: Peter Hurley <peter@hurleysoftware.com>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>,
linux-kernel@vger.kernel.org
Subject: Re: tty: incorrect test of echo_buf() result for ECHO_OP_START
Date: Fri, 11 Oct 2013 18:47:33 -0400 [thread overview]
Message-ID: <52588005.4030806@hurleysoftware.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1310112126001.11060@Z>
On 10/11/2013 04:08 PM, Roel Kluin wrote:
> Untested, but this looks like a bug to me
Careless error on my part. Fix looks good; thanks for catching this.
Regards,
Peter Hurley
> -----------
> test echo_buf() result for ECHO_OP_START
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
> index 7a744b6..42b6cca 100644
> --- a/drivers/tty/n_tty.c
> +++ b/drivers/tty/n_tty.c
> @@ -767,7 +767,7 @@ static size_t __process_echoes(struct tty_struct *tty)
> * of echo overrun before the next commit), then discard enough
> * data at the tail to prevent a subsequent overrun */
> while (ldata->echo_commit - tail >= ECHO_DISCARD_WATERMARK) {
> - if (echo_buf(ldata, tail == ECHO_OP_START)) {
> + if (echo_buf(ldata, tail) == ECHO_OP_START) {
> if (echo_buf(ldata, tail) == ECHO_OP_ERASE_TAB)
> tail += 3;
> else
prev parent reply other threads:[~2013-10-11 22:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 20:08 tty: incorrect test of echo_buf() result for ECHO_OP_START Roel Kluin
[not found] ` <CABPwjKd-e+Pq5OsNptn243WJ0a=qKizAsB3KATekMRTvsHab+g@mail.gmail.com>
2013-10-11 22:16 ` Greg Kroah-Hartman
2013-10-11 22:47 ` Peter Hurley [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=52588005.4030806@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=roel.kluin@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.