From: Kalpak Shah <kalpak@clusterfs.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-ext4 <linux-ext4@vger.kernel.org>,
TheodoreTso <tytso@mit.edu>,
Andreas Dilger <adilger@clusterfs.com>
Subject: Re: [PATCH] Endianness bugs in e2fsck
Date: Wed, 18 Jul 2007 12:34:12 +0530 [thread overview]
Message-ID: <1184742252.4009.7.camel@garfield.linsyssoft.com> (raw)
In-Reply-To: <469D6F89.9090500@redhat.com>
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@redhat.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.
prev parent reply other threads:[~2007-07-18 7:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-20 9:33 [PATCH] Endianness bugs in e2fsck Kalpak Shah
2007-06-20 15:09 ` Theodore Tso
2007-06-20 19:36 ` Kalpak Shah
2007-06-22 22:20 ` Theodore Tso
2007-06-22 23:54 ` Theodore Tso
2007-06-23 2:34 ` Theodore Tso
2007-06-23 0:36 ` Theodore Tso
2007-06-25 8:13 ` Kalpak Shah
2007-07-17 21:19 ` Eric Sandeen
2007-07-18 1:40 ` Eric Sandeen
2007-07-18 7:04 ` Kalpak Shah [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=1184742252.4009.7.camel@garfield.linsyssoft.com \
--to=kalpak@clusterfs.com \
--cc=adilger@clusterfs.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
/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.