linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Imre Deak <imre.deak@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] PM / Sleep: fix async suspend_late/freeze_late error handling
Date: Mon, 27 Oct 2014 23:45:30 +0100	[thread overview]
Message-ID: <8054820.ZaPIZ3Ztss@vostro.rjw.lan> (raw)
In-Reply-To: <1414171750-6858-1-git-send-email-imre.deak@intel.com>

On Friday, October 24, 2014 08:29:09 PM Imre Deak wrote:
> If an asynchronous suspend_late or freeze_late callback fails
> during the SUSPEND, FREEZE or QUIESCE phases we don't propagate the
> corresponding error correctly, in effect ignoring the error and
> continuing the suspend-to-ram/hibernation. During suspend-to-ram this
> could leave some devices without a valid saved context, leading to a
> failure to reinitialize them during resume. During hibernation this
> could leave some devices active interfeering with the creation /
> restoration of the hibernation image. Also this could leave the
> corresponding devices without a valid saved context and failure to
> reinitialize them during resume.
> 
> v3 (added to patchset):
> - split out this fix into a separate patch (Rafael)
> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>

Both [1-2/2] applied, thanks!

> ---
>  drivers/base/power/main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> index 4497319..9717d5f 100644
> --- a/drivers/base/power/main.c
> +++ b/drivers/base/power/main.c
> @@ -1266,6 +1266,8 @@ int dpm_suspend_late(pm_message_t state)
>  	}
>  	mutex_unlock(&dpm_list_mtx);
>  	async_synchronize_full();
> +	if (!error)
> +		error = async_error;
>  	if (error) {
>  		suspend_stats.failed_suspend_late++;
>  		dpm_save_failed_step(SUSPEND_SUSPEND_LATE);
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2014-10-27 22:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-24  7:43 [PATCH] PM / Sleep: fix recovery during s2ram/hibernation Imre Deak
2014-10-24  7:59 ` [PATCH v2] " Imre Deak
2014-10-24 14:04   ` Rafael J. Wysocki
2014-10-24 14:17     ` Imre Deak
2014-10-24 14:54       ` Rafael J. Wysocki
2014-10-24 17:29   ` [PATCH v3 1/2] PM / Sleep: fix async suspend_late/freeze_late error handling Imre Deak
2014-10-27 22:45     ` Rafael J. Wysocki [this message]
2014-10-24 17:29   ` [PATCH v3 2/2] PM / Sleep: fix recovery during resuming from hibernation Imre Deak

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=8054820.ZaPIZ3Ztss@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=imre.deak@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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;
as well as URLs for NNTP newsgroup(s).