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: <20111207083446.6ad6aa02@notabene.brown>
Date:	Wed, 7 Dec 2011 08:34:46 +1100
From:	NeilBrown <neilb@...e.de>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>,
	Ming Lei <tom.leiming@...il.com>,
	Chen Peter-B29397 <B29397@...escale.com>,
	Greg KH <greg@...ah.com>,
	Kernel development list <linux-kernel@...r.kernel.org>,
	Linux-pm mailing list <linux-pm@...r.kernel.org>,
	"hzpeterchen@...il.com" <hzpeterchen@...il.com>,
	Igor Grinberg <grinberg@...pulab.co.il>
Subject: Re: [PATCH] Driver core: leave runtime PM enabled during system
 shutdown

On Tue, 6 Dec 2011 10:26:14 -0500 (EST) Alan Stern
<stern@...land.harvard.edu> wrote:

> Disabling all runtime PM during system shutdown turns out not to be a
> good idea, because some devices may need to be woken up from a
> low-power state at that time.
> 
> The whole point of disabling runtime PM for system shutdown was to
> prevent untimely runtime-suspend method calls.  This patch (as1504)
> accomplishes the same result by incrementing the usage count for each
> device and waiting for ongoing runtime-PM callbacks to finish.  This
> is what we already do during system suspend and hibernation, which
> makes sense since the shutdown method is pretty much a legacy analog
> of the pm->poweroff method.
> 
> This fixes a regression on some OMAP systems.
> 
> Signed-off-by: Alan Stern <stern@...land.harvard.edu>
> Reported-by: NeilBrown <neilb@...e.de>
> CC: Chen Peter-B29397 <B29397@...escale.com>
> 
> ---
> 
>  drivers/base/core.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> Index: usb-3.2/drivers/base/core.c
> ===================================================================
> --- usb-3.2.orig/drivers/base/core.c
> +++ usb-3.2/drivers/base/core.c
> @@ -1743,8 +1743,10 @@ void device_shutdown(void)
>  		 */
>  		list_del_init(&dev->kobj.entry);
>  		spin_unlock(&devices_kset->list_lock);
> -		/* Disable all device's runtime power management */
> -		pm_runtime_disable(dev);
> +
> +		/* Don't allow any more runtime suspends */
> +		pm_runtime_get_noresume(dev);
> +		pm_runtime_barrier(dev);
>  
>  		if (dev->bus && dev->bus->shutdown) {
>  			dev_dbg(dev, "shutdown\n");


Thanks a lot.
I can confirm that this definitely fixes my problem.
  Tested-by: NeilBrown <neilb@...e.de>

Thanks for your help!

NeilBrown

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ