From patchwork Wed Feb 26 00:01:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Capella X-Patchwork-Id: 3719341 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 9F3379F2F7 for ; Wed, 26 Feb 2014 00:02:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A10F4201F4 for ; Wed, 26 Feb 2014 00:02:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 99FF52018E for ; Wed, 26 Feb 2014 00:02:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753234AbaBZACL (ORCPT ); Tue, 25 Feb 2014 19:02:11 -0500 Received: from mail-pd0-f182.google.com ([209.85.192.182]:58672 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753232AbaBZACI (ORCPT ); Tue, 25 Feb 2014 19:02:08 -0500 Received: by mail-pd0-f182.google.com with SMTP id v10so148165pde.13 for ; Tue, 25 Feb 2014 16:02:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=F7sM18QoWvuPlQnJpZN7JxChNBC4KFAmHjv2YylFiyg=; b=bKBOCeI6zvzxKC2Ws09aK6BE9qbMkzTWpBNEjzBGbYX6mesa6quiiEcwUQeBQbEXHt JpmwVVYk92txZb6iYlTjhLwsJjFJ90UbCYOUE6CPYrauHhE0dBR+mTgvovyR0qbiDWwP nj/n0hNFqaefjyf+k/3S8RnwmKXthv2KaR85UZB/JmV7kvsloWPH23guasIdnnoU+Uzt lhPCWLhC2LAj/LNmybmqRNzungKMJNjk8E8XRquHGFpGfNcJ4wL2pOTKsij/CbjEbALn 9IayIidM0TWPnCrIDAMOmoWc/5JL4E3f6wHaCVO3mroFrns5P3d0CjZ0KhmjpiSRfHSP 0zFg== X-Gm-Message-State: ALoCoQlg47kYV6oXa33esoce3rM3PRGNJ0kbJ80/MAVoW/lMg2jq1YuN9ouVQ0ZC9SiAYH1a0Ymj X-Received: by 10.66.192.133 with SMTP id hg5mr4807047pac.122.1393372928143; Tue, 25 Feb 2014 16:02:08 -0800 (PST) Received: from localhost (cpe-76-93-135-111.san.res.rr.com. [76.93.135.111]) by mx.google.com with ESMTPSA id ki3sm14603447pbc.6.2014.02.25.16.02.05 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 25 Feb 2014 16:02:07 -0800 (PST) From: Sebastian Capella To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org Cc: Sebastian Capella , Russ Dill , Greg Kroah-Hartman Subject: [PATCH v3 1/3] Fix hibernation restore hang in freeze_processes Date: Tue, 25 Feb 2014 16:01:58 -0800 Message-Id: <1393372920-3896-2-git-send-email-sebastian.capella@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1393372920-3896-1-git-send-email-sebastian.capella@linaro.org> References: <1393372920-3896-1-git-send-email-sebastian.capella@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 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 Cc: Russ Dill Cc: Greg Kroah-Hartman --- 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;