Search Linux Wireless

Re: [PATCH v2] mac80211: Avoid STA expiration timer truncation to u32

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

 



On Fri, Jan 16, 2015 at 03:18:41PM +0900, Masashi Honma wrote:
> On some combination of plink_timeout and HZ, the STA expiration timer will be
> unexpectedly truncated to u32. Maybe there is a question "Who sets such a large

Nice catch!

> -	ieee80211_sta_expire(sdata, ifmsh->mshcfg.plink_timeout * HZ);
> +	ieee80211_sta_expire(sdata, ifmsh->mshcfg.plink_timeout *
> +			     (unsigned long)HZ);

There's a remaining problem on 32-bit platforms: there, unsigned long
is 32 bits so 0xffffffff * HZ will still truncate to 32 bits.

For normal values of HZ though, result will still be 'a rather large
number,' so maybe it's not worth caring about that.

-- 
Bob Copeland %% http://bobcopeland.com/
--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux