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

    ext4: check for zero length extent

to the 3.3-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-check-for-zero-length-extent.patch
and it can be found in the queue-3.3 subdirectory.

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


>From 31d4f3a2f3c73f279ff96a7135d7202ef6833f12 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <[email protected]>
Date: Sun, 11 Mar 2012 23:30:16 -0400
Subject: ext4: check for zero length extent

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

commit 31d4f3a2f3c73f279ff96a7135d7202ef6833f12 upstream.

Explicitly test for an extent whose length is zero, and flag that as a
corrupted extent.

This avoids a kernel BUG_ON assertion failure.

Tested: Without this patch, the file system image found in
tests/f_ext_zero_len/image.gz in the latest e2fsprogs sources causes a
kernel panic.  With this patch, an ext4 file system error is noted
instead, and the file system is marked as being corrupted.

https://bugzilla.kernel.org/show_bug.cgi?id=42859

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

---
 fs/ext4/extents.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -300,6 +300,8 @@ static int ext4_valid_extent(struct inod
        ext4_fsblk_t block = ext4_ext_pblock(ext);
        int len = ext4_ext_get_actual_len(ext);
 
+       if (len == 0)
+               return 0;
        return ext4_data_block_valid(EXT4_SB(inode->i_sb), block, len);
 }
 


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

queue-3.3/ext4-ignore-ext4_inode_journal_data-flag-with-delalloc.patch
queue-3.3/ext4-fix-race-between-sync-and-completed-io-work.patch
queue-3.3/jbd2-clear-bh_delay-bh_unwritten-in-journal_unmap_buffer.patch
queue-3.3/ext4-check-for-zero-length-extent.patch
queue-3.3/ext4-fix-race-between-unwritten-extent-conversion-and-truncate.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to