public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
From: Kent Overstreet <koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
To: Mike Snitzer <snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: bcache memleaks
Date: Fri, 5 Apr 2013 14:07:45 -0700	[thread overview]
Message-ID: <20130405210745.GB15749@google.com> (raw)
In-Reply-To: <20130401190958.GA18634-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

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-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Date:   Fri Apr 5 13:46:13 2013 -0700

    bcache: Fix a minor memory leak on device teardown
    
    Reported-by: Mike Snitzer <snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    Signed-off-by: Kent Overstreet <koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>

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)

      parent reply	other threads:[~2013-04-05 21:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01 19:09 bcache memleaks Mike Snitzer
     [not found] ` <20130401190958.GA18634-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-04-05 21:07   ` Kent Overstreet [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130405210745.GB15749@google.com \
    --to=koverstreet-hpiqsd4aklfqt0dzr+alfa@public.gmane.org \
    --cc=axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
    --cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox