* [PATCH] ext4: correct endianness conversion in __xattr_check_inode()
@ 2016-10-11 17:01 Eric Biggers
2016-10-12 10:36 ` Jan Kara
0 siblings, 1 reply; 3+ messages in thread
From: Eric Biggers @ 2016-10-11 17:01 UTC (permalink / raw)
To: tytso, adilger.kernel; +Cc: linux-ext4, Eric Biggers
It should be cpu_to_le32(), not le32_to_cpu(). No change in behavior.
Found with sparse, and this was the only endianness warning in fs/ext4/.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
fs/ext4/xattr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index c15d633..e90c5cd 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -241,7 +241,7 @@ __xattr_check_inode(struct inode *inode, struct ext4_xattr_ibody_header *header,
int error = -EFSCORRUPTED;
if (((void *) header >= end) ||
- (header->h_magic != le32_to_cpu(EXT4_XATTR_MAGIC)))
+ (header->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC)))
goto errout;
error = ext4_xattr_check_names(entry, end, entry);
errout:
--
2.8.0.rc3.226.g39d4020
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: correct endianness conversion in __xattr_check_inode()
2016-10-11 17:01 [PATCH] ext4: correct endianness conversion in __xattr_check_inode() Eric Biggers
@ 2016-10-12 10:36 ` Jan Kara
2016-10-15 13:44 ` Theodore Ts'o
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kara @ 2016-10-12 10:36 UTC (permalink / raw)
To: Eric Biggers; +Cc: tytso, adilger.kernel, linux-ext4
On Tue 11-10-16 10:01:26, Eric Biggers wrote:
> It should be cpu_to_le32(), not le32_to_cpu(). No change in behavior.
>
> Found with sparse, and this was the only endianness warning in fs/ext4/.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/ext4/xattr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
> index c15d633..e90c5cd 100644
> --- a/fs/ext4/xattr.c
> +++ b/fs/ext4/xattr.c
> @@ -241,7 +241,7 @@ __xattr_check_inode(struct inode *inode, struct ext4_xattr_ibody_header *header,
> int error = -EFSCORRUPTED;
>
> if (((void *) header >= end) ||
> - (header->h_magic != le32_to_cpu(EXT4_XATTR_MAGIC)))
> + (header->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC)))
> goto errout;
> error = ext4_xattr_check_names(entry, end, entry);
> errout:
> --
> 2.8.0.rc3.226.g39d4020
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: correct endianness conversion in __xattr_check_inode()
2016-10-12 10:36 ` Jan Kara
@ 2016-10-15 13:44 ` Theodore Ts'o
0 siblings, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2016-10-15 13:44 UTC (permalink / raw)
To: Jan Kara; +Cc: Eric Biggers, adilger.kernel, linux-ext4
On Wed, Oct 12, 2016 at 12:36:46PM +0200, Jan Kara wrote:
> On Tue 11-10-16 10:01:26, Eric Biggers wrote:
> > It should be cpu_to_le32(), not le32_to_cpu(). No change in behavior.
> >
> > Found with sparse, and this was the only endianness warning in fs/ext4/.
> >
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
>
> Looks good. You can add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
Thanks, applied
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-15 13:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-11 17:01 [PATCH] ext4: correct endianness conversion in __xattr_check_inode() Eric Biggers
2016-10-12 10:36 ` Jan Kara
2016-10-15 13:44 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).