FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 04-23-2012, 09:26 AM
Joe Thornber
 
Default dm thin: fix memory leak of singleton bio-prison cell

On Mon, Apr 23, 2012 at 11:02:46AM +0100, Alasdair G Kergon wrote:
> On Mon, Apr 23, 2012 at 08:24:08AM +0100, Joe Thornber wrote:
> > On Thu, Apr 12, 2012 at 06:34:34PM -0400, Mike Snitzer wrote:
> > > Add missing mempool_free() to __cell_release_singleton().
> > >
> > > This is a pretty significant leak that will accumulate to over 2GB of
> > > leaked memory just from running the full thinp-test-suite.
> > When was this introduced? With agk's tweaks for 3.4?
>
> I think it was here:
> http://www.redhat.com/archives/dm-devel/2012-March/msg00080.html

Yep, this should call mempool_release:

@@ -305,22 +310,45 @@ static void cell_release(struct cell *cell, struct bio_list *bios)
* bio may be in the cell. This function releases the cell, and also does
* a sanity check.
*/
+static void __cell_release_singleton(struct cell *cell, struct bio *bio)
+{
+ hlist_del(&cell->list);
+ BUG_ON(cell->holder != bio);
+ BUG_ON(!bio_list_empty(&cell->bios));
+}
+

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 12:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org