linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sebastian.capella@linaro.org (Sebastian Capella)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/3] Fix hibernation restore hang in freeze_processes
Date: Tue, 25 Feb 2014 16:01:58 -0800	[thread overview]
Message-ID: <1393372920-3896-2-git-send-email-sebastian.capella@linaro.org> (raw)
In-Reply-To: <1393372920-3896-1-git-send-email-sebastian.capella@linaro.org>

During restore, pm_notifier chain are called with
PM_RESTORE_PREPARE.  The firmware_class driver handler
fw_pm_notify does not have a handler for this.  As a result,
it keeps a reader on the kmod.c umhelper_sem.  During
freeze_processes, the call to __usermodehelper_disable tries to
take a write lock on this semaphore and hangs waiting.

Signed-off-by: Sebastian Capella <sebastian.capella@linaro.org>
Acked-by: Ming Lei <ming.lei@canonical.com>
Cc: Russ Dill <Russ.Dill@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/base/firmware_class.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index eb8fb94..e2b51f8 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -1541,6 +1541,7 @@ static int fw_pm_notify(struct notifier_block *notify_block,
 	switch (mode) {
 	case PM_HIBERNATION_PREPARE:
 	case PM_SUSPEND_PREPARE:
+	case PM_RESTORE_PREPARE:
 		kill_requests_without_uevent();
 		device_cache_fw_images();
 		break;
-- 
1.7.9.5

  reply	other threads:[~2014-02-26  0:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26  0:01 [PATCH v3 0/3] hibernation support on ARM Sebastian Capella
2014-02-26  0:01 ` Sebastian Capella [this message]
2014-02-26  0:37   ` [PATCH v3 1/3] Fix hibernation restore hang in freeze_processes Rafael J. Wysocki
2014-02-26  0:01 ` [PATCH v3 2/3] ARM: avoid tracers in soft_restart Sebastian Capella
2014-02-26  0:02 ` [PATCH v3 3/3] ARM hibernation / suspend-to-disk Sebastian Capella
2014-02-27 22:18   ` Pavel Machek

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=1393372920-3896-2-git-send-email-sebastian.capella@linaro.org \
    --to=sebastian.capella@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).