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: <201110281351.38664.rjw@sisk.pl>
Date:	Fri, 28 Oct 2011 13:51:38 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	vbyravarasu@...dia.com
Cc:	pavel@....cz, len.brown@...el.com, gregkh@...e.de,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	pdeschrijver@...dia.com
Subject: Re: [PATCH v2] PM: fix runtime accounting calculation error

On Friday, October 28, 2011, vbyravarasu@...dia.com wrote:
> From: venu byravarasu <vbyravarasu@...dia.com>
> 
> With delta type being int, its value is made zero
> for all values of now > 0x80000000.
> Hence fixing it.
> 
> Signed-off-by: venu byravarasu <vbyravarasu@...dia.com>

Thanks, looks good.  I'll add it to the linux-pm tree's pm-fixes
branch when I'm back home later this week.

Rafael


> ---
> changes since v1:
> Removed max_num and its usage references.
> ..........
> 
>  drivers/base/power/runtime.c |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
> index 1079e03..e8a5172 100644
> --- a/drivers/base/power/runtime.c
> +++ b/drivers/base/power/runtime.c
> @@ -30,13 +30,10 @@ static int rpm_suspend(struct device *dev, int rpmflags);
>  void update_pm_runtime_accounting(struct device *dev)
>  {
>  	unsigned long now = jiffies;
> -	int delta;
> +	unsigned long delta;
>  
>  	delta = now - dev->power.accounting_timestamp;
>  
> -	if (delta < 0)
> -		delta = 0;
> -
>  	dev->power.accounting_timestamp = now;
>  
>  	if (dev->power.disable_depth > 0)
> 

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