From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932514AbbJMRQ0 (ORCPT ); Tue, 13 Oct 2015 13:16:26 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:34013 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932107AbbJMRQZ (ORCPT ); Tue, 13 Oct 2015 13:16:25 -0400 Date: Tue, 13 Oct 2015 22:46:12 +0530 From: Sudip Mukherjee To: Sudeep Dutt Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: [PATCH] misc: mic: fix memory leak Message-ID: <20151013171559.GA6720@sudip-pc> References: <1444727291-4681-1-git-send-email-sudipm.mukherjee@gmail.com> <1444754061.93285.246.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1444754061.93285.246.camel@localhost> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 13, 2015 at 09:34:21AM -0700, Sudeep Dutt wrote: > On Tue, 2015-10-13 at 14:38 +0530, Sudip Mukherjee wrote: > > + struct scif_hw_dev *sdev = scifdev->sdev; > > + > > + dma_unmap_sg(&sdev->dev, p2p->ppi_sg[SCIF_PPI_MMIO], > > + p2p->sg_nentries[SCIF_PPI_MMIO], DMA_BIDIRECTIONAL); > > Hi Sudip, > > You missed unmapping the aperture here: > > dma_unmap_sg(&sdev->dev, p2p->ppi_sg[SCIF_PPI_APER], > p2p->sg_nentries[SCIF_PPI_APER], DMA_BIDIRECTIONAL); > > Can you please resubmit this patch with the change above? Hi Sudeep, v3 sent for your review. > > Also you should mention [PATCH char-misc-next] in the next revision. Ohhh... yes, I keep forgetting that Fengguang will need this tag for his build bot. But I have one more doubt. If scif_nodeqp_send() fails then shouldn't we remove these two nodes of the p2p connection from the lists and release the resources? regards sudip