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.02.1205291137580.3231@ionos>
Date:	Tue, 29 May 2012 11:38:27 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Nikunj A Dadhania <nikunj@...ux.vnet.ibm.com>
cc:	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Gilad Ben-Yossef <gilad@...yossef.com>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [patch 2/4] timers: Consolidate base->next_timer update

On Tue, 29 May 2012, Nikunj A Dadhania wrote:

> > 
> > -static void internal_add_timer(struct tvec_base *base, struct timer_list *timer)
> > +static void
> > +__internal_add_timer(struct tvec_base *base, struct timer_list *timer)
> >  {
> >  	unsigned long expires = timer->expires;
> >  	unsigned long idx = expires - base->timer_jiffies;
> > @@ -372,6 +373,17 @@ static void internal_add_timer(struct tv
> >  	list_add_tail(&timer->entry, vec);
> >  }
> > 
> > +static void internal_add_timer(struct tvec_base *base, struct timer_list *timer)
> > +{
> > +	__internal_add_timer(base, timer);
> > +	/*
> > +	 * Update base->next_timer if this is the earliest one.
> > +	 */
> > +	if (time_before(timer->expires, base->next_timer) &&
> > +	    !tbase_get_deferrable(timer->base))
> > +		base->next_timer = timer->expires;
> > +}
> > +
> >
> Shouldn't this be like this?
> 
> +	/*
> +	 * Update base->next_timer if this is the earliest one.
> +	 */
> +	if (time_before(timer->expires, base->next_timer) &&
> +	    !tbase_get_deferrable(timer->base))
> +		base->next_timer = timer->expires;
> +	__internal_add_timer(base, timer);
> 
> As per the below code?

And why should this matter?
--
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