linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] PM / sleep: prohibit devices probing during suspend/hibernation
@ 2015-10-08 16:57 Grygorii Strashko
  2015-10-08 16:57 ` [PATCH 1/2] PM / sleep: ensure deferred probe workqueue is finished in wait_for_device_probe Grygorii Strashko
  2015-10-08 16:57 ` [PATCH 2/2] PM / sleep: prohibit devices probing during suspend/hibernation Grygorii Strashko
  0 siblings, 2 replies; 15+ messages in thread
From: Grygorii Strashko @ 2015-10-08 16:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Alan Stern
  Cc: Pavel Machek, Len Brown, linux-kernel, linux-pm,
	Grygorii Strashko, Thierry Reding

The main goal of this patchset is to ensure that devices probing will not
happen during system transition to low power states like suspend or
hibernation, because it is unsafe [1] and system behavior will be
unpredictable in this case (for example: after successful probe the device
potentially has a different set of PM callbacks than before [2]).

Tested on dra7-evm using a simple kernel module which only does 
msleep(5000) in its probe.
Test cmd: insmod test_probe.ko & echo mem > sys/power/state
 - suspend will wait for test_probe to finish

[1] https://lkml.org/lkml/2015/9/11/554
[2] https://lkml.org/lkml/2015/9/15/1039
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Thierry Reding <thierry.reding@gmail.com>
Grygorii Strashko (2):
  PM / sleep: ensure deferred probe workqueue is finished in wait_for_device_probe
  PM / sleep: prohibit devices probing during suspend/hibernation

 drivers/base/base.h       |  1 +
 drivers/base/dd.c         | 39 ++++++++++++++++++++++++++++++++++++++-
 drivers/base/power/main.c | 13 +++++++++++++
 3 files changed, 52 insertions(+), 1 deletion(-)

-- 
2.5.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-10-13 18:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-08 16:57 [PATCH 0/2] PM / sleep: prohibit devices probing during suspend/hibernation Grygorii Strashko
2015-10-08 16:57 ` [PATCH 1/2] PM / sleep: ensure deferred probe workqueue is finished in wait_for_device_probe Grygorii Strashko
2015-10-08 20:50   ` Rafael J. Wysocki
2015-10-08 20:53     ` Alan Stern
2015-10-09 14:38       ` Grygorii Strashko
2015-10-09 21:16         ` Rafael J. Wysocki
2015-10-13 18:25           ` Grygorii Strashko
2015-10-08 16:57 ` [PATCH 2/2] PM / sleep: prohibit devices probing during suspend/hibernation Grygorii Strashko
2015-10-08 17:24   ` Alan Stern
2015-10-08 18:54     ` Grygorii Strashko
2015-10-08 19:20       ` Alan Stern
2015-10-08 19:48         ` Grygorii Strashko
2015-10-08 20:05           ` Alan Stern
2015-10-08 20:46         ` Rafael J. Wysocki
2015-10-09 14:31           ` Grygorii Strashko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).