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: <201111142328.11046.rjw@sisk.pl>
Date:	Mon, 14 Nov 2011 23:28:10 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Ming Lei <tom.leiming@...il.com>
Cc:	Peter Chen <peter.chen@...escale.com>, gregkh@...e.de,
	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
	stern@...land.harvard.edu, hzpeterchen@...il.com,
	stable <stable@...nel.org>
Subject: Re: [PATCH 1/1] driver core: disable device's runtime pm during shutdown

On Monday, November 14, 2011, Ming Lei wrote:
> Hi,
> 
> On Mon, Nov 14, 2011 at 8:43 AM, Peter Chen <peter.chen@...escale.com> wrote:
> > There may be an issue when the user issue "reboot/shutdown" command, then
> > the device has shut down its hardware, after that, this runtime-pm featured
> > device's driver will probably be scheduled to do its suspend routine,
> > and at its suspend routine, it may access hardware, but the device has
> > already shutdown physically, then the system hang may be occurred.
> >
> > I ran out this issue using an auto-suspend supported USB devices, like
> > 3G modem, keyboard. The usb runtime suspend routine may be scheduled
> > after the usb controller has been shut down, and the usb runtime suspend
> > routine will try to suspend its roothub(controller), it will access
> > register, then the system hang occurs as the controller is shutdown.
> > Signed-off-by: Peter Chen <peter.chen@...escale.com>
> 
> This patch should make many guys happy about shutdown/reboot function,
> at least fix the reboot issue on my panda board, maybe CC stable@...nel.org
> is needed, :-)

I'm taking this as an ACK.

Rafael


> > ---
> >  drivers/base/core.c |    3 +++
> >  1 files changed, 3 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/base/core.c b/drivers/base/core.c
> > index bc8729d..78445f4 100644
> > --- a/drivers/base/core.c
> > +++ b/drivers/base/core.c
> > @@ -22,6 +22,7 @@
> >  #include <linux/kallsyms.h>
> >  #include <linux/mutex.h>
> >  #include <linux/async.h>
> > +#include <linux/pm_runtime.h>
> >
> >  #include "base.h"
> >  #include "power/power.h"
> > @@ -1742,6 +1743,8 @@ 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);
> >
> >                if (dev->bus && dev->bus->shutdown) {
> >                        dev_dbg(dev, "shutdown\n");
> > --
> > 1.7.1
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> > the body of a message to majordomo@...r.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> 
> thanks,
> 

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