From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: pavel@ucw.cz, len.brown@intel.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PM/Hibernate: Enable usermodehelpers in hibernate() error path
Date: Fri, 17 Feb 2012 23:52:28 +0100 [thread overview]
Message-ID: <201202172352.28478.rjw@sisk.pl> (raw)
In-Reply-To: <20120216122243.14749.34988.stgit@srivatsabhat.in.ibm.com>
On Thursday, February 16, 2012, Srivatsa S. Bhat wrote:
> If create_basic_memory_bitmaps() fails, usermodehelpers are not re-enabled
> before returning. Fix this. And while at it, reword the goto labels so that
> they look more meaningful.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Applied, thanks for catching this!
Rafael
> ---
>
> kernel/power/hibernate.c | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index 72baaf0..0a186cf 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -618,7 +618,7 @@ int hibernate(void)
> /* Allocate memory management structures */
> error = create_basic_memory_bitmaps();
> if (error)
> - goto Exit;
> + goto Enable_umh;
>
> printk(KERN_INFO "PM: Syncing filesystems ... ");
> sys_sync();
> @@ -626,7 +626,7 @@ int hibernate(void)
>
> error = freeze_processes();
> if (error)
> - goto Finish;
> + goto Free_bitmaps;
>
> error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM);
> if (error || freezer_test_done)
> @@ -659,8 +659,9 @@ int hibernate(void)
> /* Don't bother checking whether freezer_test_done is true */
> freezer_test_done = false;
>
> - Finish:
> + Free_bitmaps:
> free_basic_memory_bitmaps();
> + Enable_umh:
> usermodehelper_enable();
> Exit:
> pm_notifier_call_chain(PM_POST_HIBERNATION);
>
>
>
prev parent reply other threads:[~2012-02-17 22:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 12:23 [PATCH] PM/Hibernate: Enable usermodehelpers in hibernate() error path Srivatsa S. Bhat
2012-02-17 22:52 ` Rafael J. Wysocki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201202172352.28478.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox