All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: David Lin <dtwlin@gmail.com>, Johan Hovold <johan@kernel.org>,
	Alex Elder <elder@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: greybus: uart: fix uninitialized newline.flow_control
Date: Thu, 9 Feb 2017 17:45:34 +0100	[thread overview]
Message-ID: <20170209164534.GA17599@localhost> (raw)
In-Reply-To: <20170209130118.32127-1-colin.king@canonical.com>

On Thu, Feb 09, 2017 at 01:01:18PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Currently newline.flow_control is uninitialized, so it can contain
> any garbage from the stack.  I believe it should be initialized with
> GB_SERIAL_AUTO_RTSCTS_EN enabled if the termios c_cflag is CRTSCTS
> enabled.

Good catch. The CRTSCTS flag is actually honoured a bit further down in
the set_termios(), but there's a bug in that it assumes newline to have
been initialised with the current (old) values. It should
unconditionally set the flow_control field rather than manipulate bits
(we currently use one bit of this field).

Care to send a v2 fixing this up as suggested above?

Thanks,
Johan

      reply	other threads:[~2017-02-09 16:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 13:01 [PATCH] staging: greybus: uart: fix uninitialized newline.flow_control Colin King
2017-02-09 16:45 ` Johan Hovold [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=20170209164534.GA17599@localhost \
    --to=johan@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dtwlin@gmail.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --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 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.