From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f45.google.com ([209.85.218.45]:33749 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719AbcFESoq (ORCPT ); Sun, 5 Jun 2016 14:44:46 -0400 Received: by mail-oi0-f45.google.com with SMTP id k23so197319790oih.0 for ; Sun, 05 Jun 2016 11:44:45 -0700 (PDT) Date: Sun, 5 Jun 2016 13:44:43 -0500 From: Andy Gross To: Bjorn Andersson Cc: David Brown , Greg Kroah-Hartman , Jiri Slaby , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Frank Rowand , Nicolas Dechesne , Ivan Ivanov , Stephen Boyd , stable@vger.kernel.org Subject: Re: [PATCH] tty: serial: msm: Don't read off end of tx fifo Message-ID: <20160605184443.GD13357@hector.attlocal.net> References: <1464914908-19059-1-git-send-email-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464914908-19059-1-git-send-email-bjorn.andersson@linaro.org> Sender: stable-owner@vger.kernel.org List-ID: On Thu, Jun 02, 2016 at 05:48:28PM -0700, Bjorn Andersson wrote: > For dm uarts in pio mode tx data is transferred to the fifo register 4 > bytes at a time, but care is not taken when these 4 bytes spans the end > of the xmit buffer so the loop might read up to 3 bytes past the buffer > and then skip the actual data at the beginning of the buffer. > > Fix this by, analogous to the DMA case, make sure the chunk doesn't > wrap the xmit buffer. > > Fixes: 3a878c430fd6 ("tty: serial: msm: Add TX DMA support") > Cc: Andy Gross > Cc: Ivan Ivanov > Cc: Stephen Boyd > Cc: stable@vger.kernel.org > Reported-by: Frank Rowand > Reported-by: Nicolas Dechesne > Signed-off-by: Bjorn Andersson Acked-by: Andy Gross