From patchwork Sun Sep 29 01:16:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 2959641 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8BA339F527 for ; Sun, 29 Sep 2013 01:05:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8EE9720237 for ; Sun, 29 Sep 2013 01:05:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD7D020213 for ; Sun, 29 Sep 2013 01:05:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753375Ab3I2BFQ (ORCPT ); Sat, 28 Sep 2013 21:05:16 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:62809 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752174Ab3I2BFP (ORCPT ); Sat, 28 Sep 2013 21:05:15 -0400 Received: from 107.16.189.68 [107.16.189.68] (HELO vostro.rjw.lan) by serwer1319399.home.pl [79.96.170.134] with SMTP (IdeaSmtpServer v0.80) id e795c9c5a5319e0c; Sun, 29 Sep 2013 03:05:13 +0200 From: "Rafael J. Wysocki" To: Ronald Cc: linux-kernel@vger.kernel.org, Linux PM list Subject: Re: Fwd: [v3.12-rc1] [regression] PM / hibernate: Create memory bitmaps after freezing user space Date: Sun, 29 Sep 2013 03:16:40 +0200 Message-ID: <6939844.AIXnPB8Wdj@vostro.rjw.lan> User-Agent: KMail/4.10.5 (Linux/3.11.0+; KDE/4.10.5; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Saturday, September 28, 2013 08:18:18 PM Ronald wrote: > [ resend, forgot to disable HTML (sorry!) ] > > Dear kernel developers, > > Commit 8fd37a4c9 (PM / hibernate: Create memory bitmaps after freezing > user space) causes resume to fail. > > Only, when using the s2disk utility (through pm-hibernate). > > Not when I do: > > echo -n "disk" > /sys/power/state > > Reverting the commit did not work. > > I am using a encrypted LUKS partition with a temporary key that is > functioning as the swap device used for the suspend image. > > Awaiting further orders.... I'm traveling now, so I can't really test things, but I think I know what the problem is. Can you please check if the appended patch makes any difference for you? Rafael --- kernel/power/snapshot.c | 5 ++++- kernel/power/user.c | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-pm/kernel/power/snapshot.c =================================================================== --- linux-pm.orig/kernel/power/snapshot.c +++ linux-pm/kernel/power/snapshot.c @@ -743,7 +743,10 @@ int create_basic_memory_bitmaps(void) struct memory_bitmap *bm1, *bm2; int error = 0; - BUG_ON(forbidden_pages_map || free_pages_map); + if (forbidden_pages_map && free_pages_map) + return 0; + else + BUG_ON(forbidden_pages_map || free_pages_map); bm1 = kzalloc(sizeof(struct memory_bitmap), GFP_KERNEL); if (!bm1) Index: linux-pm/kernel/power/user.c =================================================================== --- linux-pm.orig/kernel/power/user.c +++ linux-pm/kernel/power/user.c @@ -82,6 +82,9 @@ static int snapshot_open(struct inode *i data->swap = -1; data->mode = O_WRONLY; error = pm_notifier_call_chain(PM_RESTORE_PREPARE); + if (!error) + error = create_basic_memory_bitmaps(); + if (error) pm_notifier_call_chain(PM_POST_RESTORE); }