Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1245931

Re: [PATCH] misc: mic: fix memory leak

From Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] misc: mic: fix memory leak
Date 2015-10-13 19:20 +0200
Message-ID <qjbp0-4GU-9@gated-at.bofh.it> (permalink)
References <qj3KO-1Wm-33@gated-at.bofh.it> <qjaMi-3HR-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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:
<snip>
> > +	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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] misc: mic: fix memory leak Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-10-13 11:10 +0200
  Re: [PATCH] misc: mic: fix memory leak kbuild test robot <lkp@intel.com> - 2015-10-13 12:00 +0200
    Re: [PATCH] misc: mic: fix memory leak Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-10-13 12:30 +0200
  [RFC PATCH] misc: mic: scif_deinit_p2p_info() can be static kbuild test robot <lkp@intel.com> - 2015-10-13 12:00 +0200
  Re: [PATCH] misc: mic: fix memory leak Sudeep Dutt <sudeep.dutt@intel.com> - 2015-10-13 18:40 +0200
    Re: [PATCH] misc: mic: fix memory leak Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-10-13 19:20 +0200
      Re: [PATCH] misc: mic: fix memory leak Sudeep Dutt <sudeep.dutt@intel.com> - 2015-10-13 19:30 +0200

csiph-web