From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Linux PM mailing list <linux-pm@lists.linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Alexandre Felipe Muller de Souza <alexandrefm@mandriva.com.br>
Subject: [PATCH 2/3] PM / Hibernate: Make snapshot_release() restore GFP mask
Date: Sat, 7 May 2011 00:31:16 +0200 [thread overview]
Message-ID: <201105070031.17048.rjw@sisk.pl> (raw)
In-Reply-To: <201105070029.44623.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
If the process using the hibernate user space interface closes
/dev/snapshot after creating a hibernation image without thawing
tasks, snapshot_release() should call pm_restore_gfp_mask() to
restore the GFP mask used before the creation of the image. Make
that happen.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
kernel/power/user.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: linux-2.6/kernel/power/user.c
===================================================================
--- linux-2.6.orig/kernel/power/user.c
+++ linux-2.6/kernel/power/user.c
@@ -135,8 +135,10 @@ static int snapshot_release(struct inode
free_basic_memory_bitmaps();
data = filp->private_data;
free_all_swap_pages(data->swap);
- if (data->frozen)
+ if (data->frozen) {
+ pm_restore_gfp_mask();
thaw_processes();
+ }
pm_notifier_call_chain(data->mode == O_RDONLY ?
PM_POST_HIBERNATION : PM_POST_RESTORE);
atomic_inc(&snapshot_device_available);
next prev parent reply other threads:[~2011-05-06 22:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 22:29 [PATCH 0/3] PM / Hibernate: Fixes related to user space interface Rafael J. Wysocki
2011-05-06 22:30 ` [PATCH 1/3] PM: Fix warning in pm_restrict_gfp_mask() during SNAPSHOT_S2RAM ioctl Rafael J. Wysocki
2011-05-06 22:31 ` Rafael J. Wysocki [this message]
2011-05-06 22:32 ` [PATCH 3/3] PM / Hibernate: Fix ioctl SNAPSHOT_S2RAM Rafael J. Wysocki
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=201105070031.17048.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=alexandrefm@mandriva.com.br \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
/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
all inboxes | Powered by JetHome®