All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Tao Ma <tm@tao.ma>
Cc: linux-ext4@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH] ext4: Fix a double free in ext4_register_li_request.
Date: Mon, 4 Apr 2011 17:08:32 -0400	[thread overview]
Message-ID: <20110404210832.GC2832@thunk.org> (raw)
In-Reply-To: <1301297857-3839-1-git-send-email-tm@tao.ma>

On Mon, Mar 28, 2011 at 03:37:37PM +0800, Tao Ma wrote:
> From: Tao Ma <boyu.mt@taobao.com>
> 
> In ext4_register_li_request, we malloc a ext4_li_request and
> inserts it into ext4_li_info->li_request_list. In case of any
> error later, we free it in the end. But if we have some error
> in ext4_run_lazyinit_thread, the whole li_request_list will be
> dropped and freed in it. So we will double free this ext4_li_request.
> 
> This patch just sets elr to NULL after it is inserted to the list
> so that the latter kfree won't double free it.
> 
> Cc: stable@kernel.org
> Signed-off-by: Tao Ma <boyu.mt@taobao.com>

Thanks, I've added this to the ext4 tree for 2.6.39-rcX.

	     	   	       	    - Ted

      parent reply	other threads:[~2011-04-04 21:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28  7:37 [PATCH] ext4: Fix a double free in ext4_register_li_request Tao Ma
2011-03-28 10:08 ` Lukas Czerner
2011-04-04 21:08 ` Ted Ts'o [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=20110404210832.GC2832@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=stable@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 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.