[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1184742252.4009.7.camel@garfield.linsyssoft.com>
Date: Wed, 18 Jul 2007 12:34:12 +0530
From: Kalpak Shah <kalpak@...sterfs.com>
To: Eric Sandeen <sandeen@...hat.com>
Cc: linux-ext4 <linux-ext4@...r.kernel.org>,
TheodoreTso <tytso@....edu>,
Andreas Dilger <adilger@...sterfs.com>
Subject: Re: [PATCH] Endianness bugs in e2fsck
On Tue, 2007-07-17 at 20:40 -0500, Eric Sandeen wrote:
> Eric Sandeen wrote:
> ---------
>
> set t->i_file_acl before we test it in
> ext2fs_inode_data_blocks
>
> Signed-off-by: Eric Sandeen <sandeen@...hat.com>
>
> Index: e2fsprogs-1.40.2/lib/ext2fs/swapfs.c
> ===================================================================
> --- e2fsprogs-1.40.2.orig/lib/ext2fs/swapfs.c
> +++ e2fsprogs-1.40.2/lib/ext2fs/swapfs.c
> @@ -150,6 +150,7 @@ void ext2fs_swap_inode_full(ext2_filsys
> t->i_dtime = ext2fs_swab32(f->i_dtime);
> t->i_gid = ext2fs_swab16(f->i_gid);
> t->i_links_count = ext2fs_swab16(f->i_links_count);
> + t->i_file_acl = ext2fs_swab32(f->i_file_acl);
> if (hostorder)
> has_data_blocks = ext2fs_inode_data_blocks(fs,
> (struct ext2_inode *) f);
> @@ -158,7 +159,6 @@ void ext2fs_swap_inode_full(ext2_filsys
> has_data_blocks = ext2fs_inode_data_blocks(fs,
> (struct ext2_inode *) t);
> t->i_flags = ext2fs_swab32(f->i_flags);
> - t->i_file_acl = ext2fs_swab32(f->i_file_acl);
> t->i_dir_acl = ext2fs_swab32(f->i_dir_acl);
> if (!islnk || has_data_blocks ) {
>
>
> for (i = 0; i < EXT2_N_BLOCKS; i++)
This means that on big-endian machines, t->i_file_acl was uninitialized
when it was being accessed here. This certainly seems to be the correct
fix for this.
Thanks,
Kalpak.
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists