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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 27 Oct 2009 09:38:26 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	"Dasgupta, Romit" <romit@...com>
cc:	"Hilman, Kevin" <khilman@...com>, "rjw@...k.pl" <rjw@...k.pl>,
	"linux-pm@...ts.linux-foundation.org" 
	<linux-pm@...ts.linux-foundation.org>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [linux-pm] [PATCH] PM: Fixes warning on suspend errors

On Tue, 27 Oct 2009, Dasgupta, Romit wrote:

> Hi,
>      I get the following errors when I choose devices in /sys/power/pm_test. It also shows that if 'dpm_suspend_start' fails somewhere down the line then the kernel does not reset the 'transition_started' variable and we can get warning similar to below. IMHO 'dpm_resume_noirq' is not the right place for setting this variable. Please see the patch below which fixes the issue.

> Fixes the location where we decide that our power transition is complete.
> Signed-off-by: Romit Dasgupta <romit@...com>
> ---
> diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> index e0dc407..6b9e991 100644
> --- a/drivers/base/power/main.c
> +++ b/drivers/base/power/main.c
> @@ -365,7 +365,6 @@ void dpm_resume_noirq(pm_message_t state)
>  	struct device *dev;
>  
>  	mutex_lock(&dpm_list_mtx);
> -	transition_started = false;
>  	list_for_each_entry(dev, &dpm_list, power.entry)
>  		if (dev->power.status > DPM_OFF) {
>  			int error;
> @@ -529,6 +528,7 @@ static void dpm_complete(pm_message_t state)
>  		put_device(dev);
>  	}
>  	list_splice(&list, &dpm_list);
> +	transition_started = false;
>  	mutex_unlock(&dpm_list_mtx);
>  }

The second hunk is okay, but the first hunk isn't.  We want to set 
transition_started to false as soon as devices start resuming, because 
once a resume has begun it's okay to add new devices.

Alan Stern

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