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] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1005252034430.2948@localhost.localdomain>
Date:	Tue, 25 May 2010 20:37:40 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
cc:	Jeff Chua <jeff.chua.linux@...il.com>,
	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>,
	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, Linus Torvalds wrote:
> 
> 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. 

Grr, it's even worse. If jiffies increment between the time_after()
check and (expires - jiffies) we might run into the same problem as
before. Sigh, did not notice when I picked it up. ENOTENOUGHCOFFEE.
 
> 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"

Will fix, thanks,

     tglx
--
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