This is a note to let you know that I've just added the patch titled

    ext4: fix memory leak in ext4_free_branches

to the 2.6.37-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ext4-fix-memory-leak-in-ext4_free_branches.patch
and it can be found in the queue-2.6.37 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 1c5b9e9065567876c2d4a7a16d78f0fed154a5bf Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <[email protected]>
Date: Mon, 10 Jan 2011 12:51:28 -0500
Subject: ext4: fix memory leak in ext4_free_branches

From: Theodore Ts'o <[email protected]>

commit 1c5b9e9065567876c2d4a7a16d78f0fed154a5bf upstream.

Commit 40389687 moved a call to ext4_forget() out of
ext4_free_branches and let ext4_free_blocks() handle calling
bforget().  But that change unfortunately did not replace the call to
ext4_forget() with brelse(), which was needed to drop the in-use count
of the indirect block's buffer head, which lead to a memory leak when
deleting files that used indirect blocks.  Fix this.

Thanks to Hugh Dickins for pointing this out.

Signed-off-by: "Theodore Ts'o" <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/ext4/inode.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4349,6 +4349,7 @@ static void ext4_free_branches(handle_t
                                        (__le32 *) bh->b_data,
                                        (__le32 *) bh->b_data + addr_per_block,
                                        depth);
+                       brelse(bh);
 
                        /*
                         * Everything below this this pointer has been


Patches currently in stable-queue which might be from [email protected] are

queue-2.6.37/ext4-fix-panic-on-module-unload-when-stopping-lazyinit-thread.patch
queue-2.6.37/ext4-make-grpinfo-slab-cache-names-static.patch
queue-2.6.37/ext4-unregister-features-interface-on-module-unload.patch
queue-2.6.37/ext4-fix-uninitialized-variable-in-ext4_register_li_request.patch
queue-2.6.37/ext4-fix-trimming-of-a-single-group.patch
queue-2.6.37/ext4-fix-data-corruption-with-multi-block-writepages-support.patch
queue-2.6.37/ext4-fix-memory-leak-in-ext4_free_branches.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to