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.1107041157360.12242-100000@netrider.rowland.org>
Date:	Mon, 4 Jul 2011 12:01:24 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Felipe Balbi <balbi@...com>
cc:	Partha Basak <p-basak2@...com>,
	Keshava Munegowda <keshava_mgowda@...com>,
	<linux-usb@...r.kernel.org>, <linux-omap@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, Anand Gadiyar <gadiyar@...com>,
	<sameo@...ux.intel.com>, <parthab@...ia.ti.com>,
	<tony@...mide.com>, Kevin Hilman <khilman@...com>,
	Benoit Cousson <b-cousson@...com>, <paul@...an.com>,
	<johnstul@...ibm.com>, Vishwanath Sripathy <vishwanath.bs@...com>
Subject: Re: [PATCH 6/6 v2] arm: omap: usb: global Suspend and resume support
 of ehci and ohci

On Mon, 4 Jul 2011, Felipe Balbi wrote:

> sounds to me like a bug on pm runtime ? If you're calling
> pm_runtime_*_sync() family, shouldn't all calls be _sync() too ?

No.  This was a deliberate design decision.  It minimizes stack usage 
and it gives a chance for some other child to resume before the parent 
is powered down.

> > static int rpm_suspend(struct device *dev, int rpmflags)
> > 	__releases(&dev->power.lock) __acquires(&dev->power.lock)
> > {
> > .
> > .
> > .
> > no_callback:
> > .
> > .
> > .
> > 	/* Maybe the parent is now able to suspend. */
> > 	if (parent && !parent->power.ignore_children &&
> > !dev->power.irq_safe) {
> > 		spin_unlock(&dev->power.lock);
> > 
> > 		spin_lock(&parent->power.lock);
> > 		rpm_idle(parent, RPM_ASYNC);
> 
> to me this is bogus, if you called pm_runtime_put_sync() should should
> be sync too. Shouldn't it ?

No, it shouldn't.

> > 		spin_unlock(&parent->power.lock);
> > 
> > 		spin_lock(&dev->power.lock);
> > 	}
> > This is the reason of directly calling the parent Runtime PM calls from
> > the children.
> > If directly calling Runtime PM APIs with parent dev-pointer isn't
> > acceptable,
> > this can be achieved by exporting wrapper APIs from the
> > parent and calling them from the chidren .suspend/.resume routines.
> 
> Still no good, IMHO.

The real problem here is that you guys are trying to use the runtime PM
framework to carry out activities during system suspend.  That won't
work; it's just a bad idea all round.  Use the proper callbacks to do
what you want.

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