All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: "Matias Bjørling" <m@bjorling.me>
Cc: axboe@fb.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Matias Bjørling" <mb@lightnvm.io>
Subject: Re: [PATCH] null_blk: fix memory leak on cleanup
Date: Wed, 2 Sep 2015 12:39:28 -0600	[thread overview]
Message-ID: <20150902183928.GA32255@linux.intel.com> (raw)
In-Reply-To: <1441023438-16249-1-git-send-email-m@bjorling.me>

On Mon, Aug 31, 2015 at 02:17:18PM +0200, Matias Bjørling wrote:
> From: Matias Bjørling <mb@lightnvm.io>
> 
> Driver was not freeing the memory allocated for internal nullb queues.
> This patch frees the memory during driver unload.

You may want to consider devm_* style allocations instead.  These are freed
automatically on driver unload, simplifying your error paths and your unload
logic as well as preventing leaks.

See this patch for an example:

https://lkml.org/lkml/2015/8/10/992

  reply	other threads:[~2015-09-02 18:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31 12:17 [PATCH] null_blk: fix memory leak on cleanup Matias Bjørling
2015-08-31 12:17 ` Matias Bjørling
2015-09-02 18:39 ` Ross Zwisler [this message]
2015-09-03  5:48   ` Matias Bjorling
  -- strict thread matches above, loose matches on Subject: below --
2015-07-28 12:01 Matias Bjørling

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=20150902183928.GA32255@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=axboe@fb.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m@bjorling.me \
    --cc=mb@lightnvm.io \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.