Patch "ext4: fix data offset overflow on 32-bit archs in ext4_inline_data_fiemap()" has been added to the 3.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    ext4: fix data offset overflow on 32-bit archs in ext4_inline_data_fiemap()

to the 3.9-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-data-offset-overflow-on-32-bit-archs-in-ext4_inline_data_fiemap.patch
and it can be found in the queue-3.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From eaf3793728d07d995f1e74250b2d0005f7ae98b5 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@xxxxxxx>
Date: Fri, 31 May 2013 19:33:42 -0400
Subject: ext4: fix data offset overflow on 32-bit archs in ext4_inline_data_fiemap()

From: Jan Kara <jack@xxxxxxx>

commit eaf3793728d07d995f1e74250b2d0005f7ae98b5 upstream.

On 32-bit archs when sector_t is defined as 32-bit the logic computing
data offset in ext4_inline_data_fiemap(). Fix that by properly typing
the shifted value.

Signed-off-by: Jan Kara <jack@xxxxxxx>
Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 fs/ext4/inline.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -1702,7 +1702,7 @@ int ext4_inline_data_fiemap(struct inode
 	if (error)
 		goto out;
 
-	physical = iloc.bh->b_blocknr << inode->i_sb->s_blocksize_bits;
+	physical = (__u64)iloc.bh->b_blocknr << inode->i_sb->s_blocksize_bits;
 	physical += (char *)ext4_raw_inode(&iloc) - iloc.bh->b_data;
 	physical += offsetof(struct ext4_inode, i_block);
 	length = i_size_read(inode);


Patches currently in stable-queue which might be from jack@xxxxxxx are

queue-3.9/ext4-fix-corruption-when-online-resizing-a-fs-with-1k-block-size.patch
queue-3.9/ext4-fix-data-offset-overflow-in-ext4_xattr_fiemap-on-32-bit-archs.patch
queue-3.9/ext4-fix-overflow-when-counting-used-blocks-on-32-bit-architectures.patch
queue-3.9/ext4-fix-overflows-in-seek_hole-seek_data-implementations.patch
queue-3.9/ext4-fix-data-offset-overflow-on-32-bit-archs-in-ext4_inline_data_fiemap.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]