Re: bcache memleaks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 01, 2013 at 03:09:58PM -0400, Mike Snitzer wrote:
> FYI, here are some leaks that kmemleak caught when I tested Jens'
> for-next with test_git_extract_bcache_quick from the thinp-test-suite:

Thanks - looks like it was all the same allocation. Just pushed the fix:


commit 671963671170880beed71378f51124433ffeebb8
Author: Kent Overstreet <koverstreet@xxxxxxxxxx>
Date:   Fri Apr 5 13:46:13 2013 -0700

    bcache: Fix a minor memory leak on device teardown
    
    Reported-by: Mike Snitzer <snitzer@xxxxxxxxxx>
    Signed-off-by: Kent Overstreet <koverstreet@xxxxxxxxxx>

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index f47ecb5..5fa3cd2 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -64,9 +64,11 @@ struct workqueue_struct *bcache_wq;
 
 static void bio_split_pool_free(struct bio_split_pool *p)
 {
+	if (p->bio_split_hook)
+		mempool_destroy(p->bio_split_hook);
+
 	if (p->bio_split)
 		bioset_free(p->bio_split);
-
 }
 
 static int bio_split_pool_init(struct bio_split_pool *p)
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux