Search Linux Wireless

Re: [PATCH 1/1] mac80211: Tkip fix sparse endianity complain in tkip code

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

 



On Thu, Mar 13, 2008 at 11:02 PM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
>
>  On Thu, 2008-03-13 at 20:05 +0200, Tomas Winkler wrote:
>  > This patch fix wrong cast in tkip code
>  >
>  > Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
>  > ---
>  >  net/mac80211/tkip.c |    2 +-
>  >  1 files changed, 1 insertions(+), 1 deletions(-)
>  >
>  > diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c
>  > index f61f1dd..0ce2a84 100644
>  > --- a/net/mac80211/tkip.c
>  > +++ b/net/mac80211/tkip.c
>  > @@ -118,7 +118,7 @@ static u8 *set_ext_iv(u8 *pos, u16 iv16)
>  >
>  >  static u8 *set_tkip_iv(u8 *pos, u32 iv32)
>  >  {
>  > -     *((u32 *)pos) = cpu_to_le32(iv32);
>  > +     *((__le32 *)pos) = cpu_to_le32(iv32);
>
>  The patch introducing this code will be reverted because this is also
>  rather bad code since it's not known that "pos" is aligned to a
>  four-byte boundary.

Agree, actually I was puzzled it was even merged in after all these
discussions. Anyhow it sparsed into my eye so I put a patch on it.

>
>  johannes
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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