lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1005240754130.3689@i5.linux-foundation.org>
Date:	Mon, 24 May 2010 07:57:02 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Jeff Chua <jeff.chua.linux@...il.com>
cc:	Johannes Berg <johannes.berg@...el.com>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	"johnstul@...ibm.com" <johnstul@...ibm.com>,
	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Intel Linux Wireless <ilw@...ux.intel.com>,
	"John W. Linville" <linville@...driver.com>,
	Frans Pop <elendil@...net.nl>,
	"Chatre, Reinette" <reinette.chatre@...el.com>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: Wireless IBSS on Linux-2.6.34 broken by commit
 3bbb9ec946428b96657126768f65487a48dd090c



On Mon, 24 May 2010, Jeff Chua wrote:
> 
> -	expires_limit = expires + timer->slack;
> +	expires_limit = expires;
> 
> -	if (timer->slack < 0) /* auto slack: use 0.4% */
> +	if (timer->slack > -1)
> +		expires_limit = expires + timer->slack;
> +	else if (time_after(expires, jiffies)) /* auto slack: use 0.4% */
>  		expires_limit = expires + (expires - jiffies)/256;

Please don't reload 'jiffies' twice. It's volatile, and the compiler will 
do a crap job of it. 

Also, '0' is a normal number, but '-1' is a rather odd value. Please just 
test for non-negative by doing ">= 0" rather than "> -1"

		Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ