lkml.org 
[lkml]   [2008]   [Jun]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 4 Jun 2008 01:14:46 -0500
From"Steve French" <>
SubjectRe: [PATCH] cifs endianness fixes
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


\
 
 \ /
  Last update: 2008-06-04 08:17    [from the cache]
©2003-2008