From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754655AbdJMHLZ (ORCPT ); Fri, 13 Oct 2017 03:11:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:53261 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751284AbdJMHLX (ORCPT ); Fri, 13 Oct 2017 03:11:23 -0400 Date: Fri, 13 Oct 2017 09:11:21 +0200 From: Michal Hocko To: "Levin, Alexander (Sasha Levin)" Cc: "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] kmemcheck: correctly remove kmemcheck call from dma_map_sg_attrs Message-ID: <20171013071121.4v73j7gn472ezv23@dhcp22.suse.cz> References: <20171012192151.26531-1-alexander.levin@verizon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171012192151.26531-1-alexander.levin@verizon.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 12-10-17 19:22:05, Sasha Levin wrote: > We have missed removing some code as part of removing the kmemcheck > hooks. > > Unfourtenatly this got missed during my review, and the code was > still building. > > Reported-by: Michal Hocko > Signed-off-by: Sasha Levin Yes this would be the proper fix for the specific issue I have noticed. There might be others I haven't even checked. Really the only way to make this chage is to post a reproducible steps to regenerate your diff and review that the used scripts are correct. Follow up fixes are not a way to go > --- > include/linux/dma-mapping.h | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h > index 83f3ab31efc4..2911389bc147 100644 > --- a/include/linux/dma-mapping.h > +++ b/include/linux/dma-mapping.h > @@ -260,10 +260,8 @@ static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, > unsigned long attrs) > { > const struct dma_map_ops *ops = get_dma_ops(dev); > - int i, ents; > - struct scatterlist *s; > + int ents; > > - for_each_sg(sg, s, nents, i) > BUG_ON(!valid_dma_direction(dir)); > ents = ops->map_sg(dev, sg, nents, dir, attrs); > BUG_ON(ents < 0); > -- > 2.11.0 -- Michal Hocko SUSE Labs