Search Linux Wireless

Re: [PATCH] Fix SPARC64 unaligned access in zd_mac_rx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2009-08-01 at 19:41 -0600, Patrick Simmons wrote:

> --- a/drivers/net/wireless/zd1211rw/zd_mac.c
> +++ b/drivers/net/wireless/zd1211rw/zd_mac.c
> @@ -694,7 +694,7 @@
>                          && !mac->pass_ctrl)
>                  return 0;
> 
> -       fc = *(__le16 *)buffer;
> +       fc = get_unaligned(buffer);

Now the code is completely incorrect -- you're now loading the lower 16
bits of the 'buffer' _pointer_ into the variable as an unaligned load.

It really needs to be

fc = get_unaligned((__le16 *)buffer);

I think.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux