From: Sebastian Capella Date: Wed, 19 Feb 2014 01:52:08 +0000 (-0800) Subject: PM / hibernate: Fix restore hang in freeze_processes() X-Git-Tag: submit/tizen_common/20140905.094502~501 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3787169fa3185aa8587972b5fdccbf700f60a4f1;p=sdk%2Femulator%2Femulator-kernel.git PM / hibernate: Fix restore hang in freeze_processes() commit f8d5b9e9e5372f0deb7bc1ab1088a9b60b0a793d upstream. 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 Acked-by: Ming Lei Signed-off-by: Rafael J. Wysocki Signed-off-by: Jiri Slaby --- diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 10a4467c63f1..701212ba38b7 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -1529,6 +1529,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;