All of lore.kernel.org
 help / color / mirror / Atom feed
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 3/3] PM / Hibernate: Fix ioctl SNAPSHOT_S2RAM
Date: Sat, 7 May 2011 00:32:27 +0200	[thread overview]
Message-ID: <201105070032.27540.rjw@sisk.pl> (raw)
In-Reply-To: <201105070029.44623.rjw@sisk.pl>

From: Rafael J. Wysocki <rjw@sisk.pl>

The SNAPSHOT_S2RAM ioctl used for implementing the feature allowing
one to suspend to RAM after creating a hibernation image is currently
broken, because it doesn't clear the "ready" flag in the struct
snapshot_data object handled by it.  As a result, the
SNAPSHOT_UNFREEZE doesn't work correctly after SNAPSHOT_S2RAM has
returned and the user space hibernate task cannot thaw the other
processes as appropriate.  Make SNAPSHOT_S2RAM clear data->ready
to fix this problem.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 kernel/power/user.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6/kernel/power/user.c
===================================================================
--- linux-2.6.orig/kernel/power/user.c
+++ linux-2.6/kernel/power/user.c
@@ -381,6 +381,7 @@ static long snapshot_ioctl(struct file *
 		 * PM_HIBERNATION_PREPARE
 		 */
 		error = suspend_devices_and_enter(PM_SUSPEND_MEM);
+		data->ready = 0;
 		break;
 
 	case SNAPSHOT_PLATFORM_SUPPORT:


  parent reply	other threads:[~2011-05-06 22:32 UTC|newest]

Thread overview: 7+ 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:30 ` Rafael J. Wysocki
2011-05-06 22:31 ` [PATCH 2/3] PM / Hibernate: Make snapshot_release() restore GFP mask Rafael J. Wysocki
2011-05-06 22:31 ` Rafael J. Wysocki
2011-05-06 22:32 ` 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=201105070032.27540.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.