Skip to contentSkip to conversation

PM / Hibernate: Enable usermodehelpers in software_resume() error path

PATCH Applied Srivatsa S. Bhat 3 participants 3 messages Dec 1, 2011 – Dec 2, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PM / Hibernate: Enable usermodehelpers in software_resume() error path

In the software_resume() function defined in kernel/power/hibernate.c, if the call to create_basic_memory_bitmaps() fails, the usermodehelpers are not enabled (which had been disabled in the previous step). Fix it.

---

 kernel/power/hibernate.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
kernel/power/hibernate.c +3 -1
index a6b0503..df35313 100644
@@ -811,8 +811,10 @@ static int software_resume(void)
 		goto close_finish;
 
 	error = create_basic_memory_bitmaps();
-	if (error)
+	if (error) {
+		usermodehelper_enable();
 		goto close_finish;
+	}
 
 	pr_debug("PM: Preparing processes for restore.\n");
 	error = prepare_processes();
#1 lore raw
Quoted 5 lines · Srivatsa S. Bhat

In the software_resume() function defined in kernel/power/hibernate.c, if the call to create_basic_memory_bitmaps() fails, the usermodehelpers are not enabled (which had been disabled in the previous step). Fix it.

Applied to linux-pm/linux-next.

Thanks,
Rafael

Quoted 24 lines

---

 kernel/power/hibernate.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
kernel/power/hibernate.c +3 -1
index a6b0503..df35313 100644
@@ -811,8 +811,10 @@ static int software_resume(void)
 		goto close_finish;
 
 	error = create_basic_memory_bitmaps();
-	if (error)
+	if (error) {
+		usermodehelper_enable();
 		goto close_finish;
+	}
 
 	pr_debug("PM: Preparing processes for restore.\n");
 	error = prepare_processes();
#2 lore raw
In reply to Srivatsa S. Bhat
Quoted 5 lines

In the software_resume() function defined in kernel/power/hibernate.c, if the call to create_basic_memory_bitmaps() fails, the usermodehelpers are not enabled (which had been disabled in the previous step). Fix it.

Ack.

Quoted 21 lines

---

 kernel/power/hibernate.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
kernel/power/hibernate.c +3 -1
index a6b0503..df35313 100644
@@ -811,8 +811,10 @@ static int software_resume(void)
 		goto close_finish;
 
 	error = create_basic_memory_bitmaps();
-	if (error)
+	if (error) {
+		usermodehelper_enable();
 		goto close_finish;
+	}
 
 	pr_debug("PM: Preparing processes for restore.\n");
 	error = prepare_processes();
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html