mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jeff Chua <jeff.chua.linux@gmail.com>,
	Johannes Berg <johannes.berg@intel.com>,
	Arjan van de Ven <arjan@linux.intel.com>,
	"johnstul@us.ibm.com" <johnstul@us.ibm.com>,
	Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Intel Linux Wireless <ilw@linux.intel.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	Frans Pop <elendil@planet.nl>,
	"Chatre, Reinette" <reinette.chatre@intel.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: Wireless IBSS on Linux-2.6.34 broken by commit 3bbb9ec946428b96657126768f65487a48dd090c
Date: Tue, 25 May 2010 20:37:40 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1005252034430.2948@localhost.localdomain> (raw)
In-Reply-To: <alpine.LFD.2.00.1005240754130.3689@i5.linux-foundation.org>

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

  reply	other threads:[~2010-05-25 18:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-23 23:16 Jeff Chua
2010-05-24 14:57 ` Linus Torvalds
2010-05-25 18:37   ` Thomas Gleixner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-24 22:48 Jeff Chua
2010-05-23 17:07 Jeff Chua
2010-05-23  4:58 Jeff Chua
2010-05-23  6:21 ` Arjan van de Ven
2010-05-23  9:49 ` Johannes Berg
2010-05-23 13:19   ` Jeff Chua

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.1005252034430.2948@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=elendil@planet.nl \
    --cc=ilw@linux.intel.com \
    --cc=jeff.chua.linux@gmail.com \
    --cc=johannes.berg@intel.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mingo@elte.hu \
    --cc=reinette.chatre@intel.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®