Re: ath9k_htc: memory corruption calling set_bit()

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

 



> In d8a2c51cdcae ('ath9k_htc: Use atomic operations for op_flags') we
> changed things like this:
> 
> -	if (priv->op_flags & OP_TSF_RESET) {
> +	if (test_bit(OP_TSF_RESET, &priv->op_flags)) {
> 
> The problem is that test_bit() takes a bit number and not a mask.  It
> means that when we do:
> 
> 	set_bit(OP_TSF_RESET, &priv->op_flags);
> 
> Then it sets the (1 << 6) bit instead of the 6 bit so we are setting a
> bit which is past the end of the unsigned long.
> 
> Fixes: d8a2c51cdcae ('ath9k_htc: Use atomic operations for op_flags')
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Thanks, applied to wireless-drivers-next.git.

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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux