From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:56557 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752680AbdHBNv3 (ORCPT ); Wed, 2 Aug 2017 09:51:29 -0400 Date: Wed, 2 Aug 2017 06:51:25 -0700 From: Greg KH To: Chris Brandt Cc: "stable@vger.kernel.org" , Geert Uytterhoeven , Wolfram Sang , Ulf Hansson Subject: Re: [PATCH] mmc: tmio-mmc: fix bad pointer math Message-ID: <20170802135125.GA28578@kroah.com> References: <20170801204334.106262-1-chris.brandt@renesas.com> <20170801210337.GA9762@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: On Wed, Aug 02, 2017 at 12:08:39PM +0000, Chris Brandt wrote: > On Tuesday, August 01, 2017, Greg KH wrote: > > On Tue, Aug 01, 2017 at 03:43:34PM -0500, Chris Brandt wrote: > > > commit 9c284c41c0886f09e75c323a16278b6d353b0b4a upstream. > > > > > > The existing code gives an incorrect pointer value. > > > The buffer pointer 'buf' was of type unsigned short *, and 'count' was a > > > number in bytes. A cast of buf should have been used. > > > > > > However, instead of casting, just change the code to use u32 pointers. > > > > > > Reported-by: Dan Carpenter > > > Fixes: 8185e51f358a: ("mmc: tmio-mmc: add support for 32bit data port") > > > Signed-off-by: Chris Brandt > > > Reviewed-by: Geert Uytterhoeven > > > Acked-by: Wolfram Sang > > > Cc: > > > Signed-off-by: Ulf Hansson > > > --- > > > drivers/mmc/host/tmio_mmc_pio.c | 19 +++++++++---------- > > > 1 file changed, 9 insertions(+), 10 deletions(-) > > > > What kernel tree(s) is this for? > > > > thanks, > > > > greg k-h > > I created this patch using the current 4.12.y branch. The code it fixes > went in 4.10. > > The one thing I couldn't figure out by just looking at other stable > commits was how you were supposed to know what tree I based the patch off so > you had an idea where/how to apply it to. All I saw was that people > just added 'commit xxxx upstream' to the commit log, but not what it was > backported to. > > How was I supposed to give that info to you? Just say below the --- line, "This patch is for kernel trees X, Y, and Z" or some such thing. thanks, greg k-h