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]
Date:	Wed, 25 Mar 2015 13:55:30 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Tomeu Vizoso <tomeu.vizoso@...labora.com>
cc:	linux-kernel@...r.kernel.org,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<linux-pm@...r.kernel.org>
Subject: Re: [PATCH] PM / sleep: Don't unset parent's direct_complete

On Wed, 25 Mar 2015, Tomeu Vizoso wrote:

> If a device isn't going to be fully-suspended because there isn't an
> implementation of the suspend callback, there's no need to make sure
> that its parent is going to be fully-suspended as well.

What do you mean by "fully-suspended"?

What if the parent has several children?  Maybe some of them have 
implementations of the suspend callback and the others don't.  Will 
your patch do the right thing then?

> Without this change, USB interface devices will always prevent the
> proper USB device to stay in runtime suspension when the system
> suspends.

For USB it doesn't matter; everything gets resumed when the system 
wakes up.

> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@...labora.com>
> ---
> 
> Hi,
> 
> I'm not sure if this is the right fix,

What are you trying to fix?  Is something currently wrong?

>  because I don't see why the USB
> interface devices are in the dpm_list in the first place, so any comments will
> be welcome.

_Every_ device is in the dpm_list, including USB interfaces.

If your goal is to prevent USB devices from being resumed when the
system wakes up, then the correct approach is to make usb_dev_prepare()  
return 1 rather than 0 under the appropriate conditions, and to add a
dev_pm_ops to the usb_if_device_type structure with a prepare callback 
that returns 1.

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