linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Tao Ma <tm@tao.ma>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: Fix a double free of sbi->s_group_info in ext4_mb_init_backend
Date: Mon, 11 Jul 2011 18:44:08 -0400	[thread overview]
Message-ID: <20110711224408.GT28763@thunk.org> (raw)
In-Reply-To: <1310398016-8104-2-git-send-email-tm@tao.ma>

On Mon, Jul 11, 2011 at 11:26:56PM +0800, Tao Ma wrote:
> From: Tao Ma <boyu.mt@taobao.com>
> 
> If we meet with an error in ext4_mb_add_groupinfo, we kfree
> sbi->s_group_info[group >> EXT4_DESC_PER_BLOCK_BITS(sb)], but fail to
> reset it to NULL. So the caller ext4_mb_init_backend will try to kfree
> it again and causes a double free. So fix it by resetting it to NULL.
> 
> Some typo in comments of mballoc.c are also changed.
> 
> Signed-off-by: Tao Ma <boyu.mt@taobao.com>

Added to the ext4 tree, thanks.

						- Ted

  reply	other threads:[~2011-07-11 22:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-11 15:26 [PATCH] ext4: Avoid memory leak of ext4_groupinfo_caches in ext4_groupinfo_create_slab Tao Ma
2011-07-11 15:26 ` [PATCH] ext4: Fix a double free of sbi->s_group_info in ext4_mb_init_backend Tao Ma
2011-07-11 22:44   ` Ted Ts'o [this message]
2011-07-11 22:37 ` [PATCH] ext4: Avoid memory leak of ext4_groupinfo_caches in ext4_groupinfo_create_slab Ted Ts'o

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=20110711224408.GT28763@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tm@tao.ma \
    /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).