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: <Pine.LNX.4.44L0.1012122245040.4379-100000@netrider.rowland.org>
Date:	Sun, 12 Dec 2010 22:46:24 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
cc:	Linux-pm mailing list <linux-pm@...ts.linux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [linux-pm] [RFC][PATCH 1/4] PM: Use a different list of devices
 for each stage of device suspend

On Sun, 12 Dec 2010, Alan Stern wrote:

> On Mon, 13 Dec 2010, Rafael J. Wysocki wrote:
> 
> > From: Rafael J. Wysocki <rjw@...k.pl>
> > 
> > Instead of keeping all devices in the same list during system suspend
> > and resume, regardless of what suspend-resume callbacks have been
> > executed for them already, use separate lists of devices that have
> > had their ->prepare(), ->suspend() and ->suspend_noirq() callbacks
> > executed.  This will allow us to simplify the core device suspend and
> > resume routines.
> 
> Okay in principle.  But there's one mistake...
> 
> > @@ -699,8 +693,8 @@ static void dpm_complete(pm_message_t st
> >  	INIT_LIST_HEAD(&list);
> >  	mutex_lock(&dpm_list_mtx);
> >  	transition_started = false;
> > -	while (!list_empty(&dpm_list)) {
> > -		struct device *dev = to_device(dpm_list.prev);
> > +	while (!list_empty(&dpm_prepared_list)) {
> > +		struct device *dev = to_device(dpm_prepared_list.prev);
> >  
> >  		get_device(dev);
> >  		if (dev->power.status > DPM_ON) {
> 
> The parts about getting rid of "list" and putting dev back onto
> dpm_list got left out.

Never mind.  I forgot that we need to keep using the intermediate list
in order to handle new devices being registered while the resumes are
taking place.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ