linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	enh@google.com, linux-mtd@lists.infradead.org, nnk@google.com
Subject: Re: [PATCH] MTD: FTL layer: don't free input argument in add_mtd_blktrans_dev
Date: Tue, 18 Jan 2011 10:32:37 +0200	[thread overview]
Message-ID: <1295339557.2470.64.camel@koala> (raw)
In-Reply-To: <1294529106-32586-1-git-send-email-maximlevitsky@gmail.com>

On Sun, 2011-01-09 at 01:25 +0200, Maxim Levitsky wrote:
> This one liner patch fixes double free that will occur if add_mtd_blktrans_dev
> fails. On failure it free input argument, but all its users
> also free it on error which is natural thing to do.
> Thus don't free it.
> 
> All credit for finding that bug belongs to reporters of the bug in the android bugzilla
> http://code.google.com/p/android/issues/detail?id=13761
> 
> Signed-of-by: Maxim Levitsky <maximlevitsky@gmail.com>

Signed-off-by, (off, not of). I'll fix this.

I'll change your subject line to:

mtd: mtd_blkdevs: fix double free on error path

a) We use "mtd:" prefix, not "MTD:".
b). mtd_blkdevs is not really an FTL layer, I think.
c). The subject line has to make it obvious whether this is a bugfix or
something else - it makes life of people who look at commit messages ans
search for stuff important stuff easier. Your subject line is
technically correct, but not very helpful.

Anyway, picked to l2-mtd-2.6.git, thanks!

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)

      reply	other threads:[~2011-01-18  8:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-08 23:25 [PATCH] MTD: FTL layer: don't free input argument in add_mtd_blktrans_dev Maxim Levitsky
2011-01-18  8:32 ` Artem Bityutskiy [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=1295339557.2470.64.camel@koala \
    --to=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=enh@google.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=maximlevitsky@gmail.com \
    --cc=nnk@google.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;
as well as URLs for NNTP newsgroup(s).