From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932216AbdBIQq0 (ORCPT ); Thu, 9 Feb 2017 11:46:26 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:36352 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753383AbdBIQpm (ORCPT ); Thu, 9 Feb 2017 11:45:42 -0500 Date: Thu, 9 Feb 2017 17:45:34 +0100 From: Johan Hovold To: Colin King Cc: David Lin , Johan Hovold , Alex Elder , Greg Kroah-Hartman , 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 Message-ID: <20170209164534.GA17599@localhost> References: <20170209130118.32127-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170209130118.32127-1-colin.king@canonical.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 09, 2017 at 01:01:18PM +0000, Colin King wrote: > From: Colin Ian King > > 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