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

2015-10-13 Thread Sudeep Dutt
On Tue, 2015-10-13 at 22:46 +0530, Sudip Mukherjee wrote: > 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_M

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

2015-10-13 Thread Sudip Mukherjee
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_BI

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

2015-10-13 Thread Sudeep Dutt
On Tue, 2015-10-13 at 14:38 +0530, Sudip Mukherjee wrote: > In scif_node_connect() we were returning if the initialization of p2p_ji > fails. But at that time p2p_ij has already been initialized and > resources allocated for it. And since p2p_ij is not added to the list > till now so we will have a

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

2015-10-13 Thread Sudip Mukherjee
On Tue, Oct 13, 2015 at 05:50:12PM +0800, kbuild test robot wrote: > Hi Sudip, > > [auto build test WARNING on char-misc/char-misc-next -- if it's inappropriate > base, please suggest rules for selecting the more suitable base] > > url: > https://github.com/0day-ci/linux/commits/Sudip-Mukher

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

2015-10-13 Thread kbuild test robot
Hi Sudip, [auto build test WARNING on char-misc/char-misc-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Sudip-Mukherjee/misc-mic-fix-memory-leak/20151013-171026 reproduce: # apt-get install

[PATCH] misc: mic: fix memory leak

2015-10-13 Thread Sudip Mukherjee
In scif_node_connect() we were returning if the initialization of p2p_ji fails. But at that time p2p_ij has already been initialized and resources allocated for it. And since p2p_ij is not added to the list till now so we will have a leak. Lets deinitialize and release the resources connected to p2