mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Muthu Kumar <muthu.lkml@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [block:for-3.14/core]: bio_endio: Warn and free bio if bi_end_io is not set.
Date: Wed, 08 Jan 2014 09:34:19 -0700	[thread overview]
Message-ID: <52CD7E0B.6020606@kernel.dk> (raw)
In-Reply-To: <CAFR8uecjVRQg5S9RKKjZQ+t+7jFVed_T1BhhdXJFO60EK=9XGw@mail.gmail.com>

On 01/07/2014 06:57 PM, Muthu Kumar wrote:
> Jens,
> In bio_endio if bio doesn't have bi_end_io (should be an error case),
> we set bio to NULL and continue silently without freeing the bio. It
> would be good to have a WARN and free the bio to avoid memory leak.
> 
> If you agree, here is the patch.

I don't remember off the top of my head if there are valid uses cases of
it. But leaking it would definitely be problematic. So I think it's a
good idea to queue it up, then we'll see if it triggers anything.

-- 
Jens Axboe


      reply	other threads:[~2014-01-08 16:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08  1:57 Muthu Kumar
2014-01-08 16:34 ` Jens Axboe [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=52CD7E0B.6020606@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=muthu.lkml@gmail.com \
    /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

Powered by JetHome