* [PATCH] cifs endianness fixes
@ 2008-06-02 9:59 Al Viro
2008-06-04 6:14 ` Steve French
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2008-06-02 9:59 UTC (permalink / raw)
To: torvalds; +Cc: sfrench, linux-kernel
__le16 fields used as host-endian.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 9b8b4cf..fb655b4 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -3927,9 +3927,9 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
}
ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals);
- if (ref->VersionNumber != 3) {
+ if (ref->VersionNumber != cpu_to_le16(3)) {
cERROR(1, ("Referrals of V%d version are not supported,"
- "should be V3", ref->VersionNumber));
+ "should be V3", le16_to_cpu(ref->VersionNumber)));
rc = -EINVAL;
goto parse_DFS_referrals_exit;
}
@@ -3977,7 +3977,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
if (rc)
goto parse_DFS_referrals_exit;
- ref += ref->Size;
+ ref += le16_to_cpu(ref->Size);
}
parse_DFS_referrals_exit:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] cifs endianness fixes
2008-06-02 9:59 [PATCH] cifs endianness fixes Al Viro
@ 2008-06-04 6:14 ` Steve French
0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2008-06-04 6:14 UTC (permalink / raw)
To: torvalds; +Cc: sfrench, linux-kernel, Al Viro
ACK
Please merge
On Mon, Jun 2, 2008 at 4:59 AM, Al Viro <viro@ftp.linux.org.uk> wrote:
>
> __le16 fields used as host-endian.
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index 9b8b4cf..fb655b4 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -3927,9 +3927,9 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
> }
>
> ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals);
> - if (ref->VersionNumber != 3) {
> + if (ref->VersionNumber != cpu_to_le16(3)) {
> cERROR(1, ("Referrals of V%d version are not supported,"
> - "should be V3", ref->VersionNumber));
> + "should be V3", le16_to_cpu(ref->VersionNumber)));
> rc = -EINVAL;
> goto parse_DFS_referrals_exit;
> }
> @@ -3977,7 +3977,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
> if (rc)
> goto parse_DFS_referrals_exit;
>
> - ref += ref->Size;
> + ref += le16_to_cpu(ref->Size);
> }
>
> parse_DFS_referrals_exit:
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-04 6:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-02 9:59 [PATCH] cifs endianness fixes Al Viro
2008-06-04 6:14 ` Steve French
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®