diff mbox

PM / hibernate: Move software_resume to late_initcall_sync

Message ID 1382621126-24090-1-git-send-email-Russ.Dill@ti.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Russ Dill Oct. 24, 2013, 1:25 p.m. UTC
software_resume is being called after deferred_probe_initcall in
drivers base. If the probing of the device that contains the resume
image is deferred, and the system has been instructed to wait for
it to show up, this wait will occur in software_resume. This causes
a deadlock.

Move software_resume into late_initcall_sync so that it happens
after all the other late_initcalls.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
---
 kernel/power/hibernate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pavel Machek Oct. 24, 2013, 2:21 p.m. UTC | #1
Hi!

> software_resume is being called after deferred_probe_initcall in
> drivers base. If the probing of the device that contains the resume
> image is deferred, and the system has been instructed to wait for
> it to show up, this wait will occur in software_resume. This causes
> a deadlock.
> 
> Move software_resume into late_initcall_sync so that it happens
> after all the other late_initcalls.
> 
> Signed-off-by: Russ Dill <Russ.Dill@ti.com>

Acked-by: Pavel Machek <Pavel@ucw.cz>
diff mbox

Patch

diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index c9c759d..0121dab 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -846,7 +846,7 @@  static int software_resume(void)
 	goto Finish;
 }
 
-late_initcall(software_resume);
+late_initcall_sync(software_resume);
 
 
 static const char * const hibernation_modes[] = {