lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1444757120.93285.268.camel@localhost>
Date:	Tue, 13 Oct 2015 10:25:20 -0700
From:	Sudeep Dutt <sudeep.dutt@...el.com>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:	Sudeep Dutt <sudeep.dutt@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] misc: mic: fix memory leak

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:
> <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?

The resources will get cleaned up via scif_destroy_p2p(..) once they are
added to the lists.

Sudeep Dutt

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ