From patchwork Tue Feb 25 00:27:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Capella X-Patchwork-Id: 3712341 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 6A6479F2F7 for ; Tue, 25 Feb 2014 00:28:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 98C032017E for ; Tue, 25 Feb 2014 00:28:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF5162015A for ; Tue, 25 Feb 2014 00:28:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751539AbaBYA2X (ORCPT ); Mon, 24 Feb 2014 19:28:23 -0500 Received: from mail-pb0-f49.google.com ([209.85.160.49]:49892 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752905AbaBYA1x (ORCPT ); Mon, 24 Feb 2014 19:27:53 -0500 Received: by mail-pb0-f49.google.com with SMTP id jt11so1910878pbb.8 for ; Mon, 24 Feb 2014 16:27:53 -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=FuJ+FMpZ5OOc7TE+TN/fJafbYlbWIj5+568U2l7wR8ikjy2iKkAnBjVbWOStIiXQWL jqD0SxWWps70+2rf9zcI+GTVbhaa2Qi79f/UYv6pHfy8BIdMw/nU7nnYdW6gR2wBEOQ+ Pjo4hdZXGL0qSbYiylOUTULD2wwf+vcD4Bd/SABa9lwP+RVm7C2WvS38X9VaB4Al1lrv 0rkcRMzsY9WLQxZL9zhdj3vQ8AgA9KwaUXZfC4UC6abMhnLitcwj/TMz1+ASwTFz0FC3 l9YRKRaRwhngegRE0/D5Fg1d/oViONsF58BNt6Ff1bVR0g5VFtbUpwp2rIwr764CqbUC oubw== X-Gm-Message-State: ALoCoQke5ycUvynRCdq56dzZ5zt8qojt58sjVhrKvtp2sQEo52ohajaQAYCrDBLtv41sXPUfFqcj X-Received: by 10.68.36.41 with SMTP id n9mr2694822pbj.99.1393288073467; Mon, 24 Feb 2014 16:27:53 -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 yd4sm4073968pbc.13.2014.02.24.16.27.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 24 Feb 2014 16:27:52 -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 v2 2/3] Fix hibernation restore hang in freeze_processes Date: Mon, 24 Feb 2014 16:27:38 -0800 Message-Id: <1393288059-18174-3-git-send-email-sebastian.capella@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1393288059-18174-1-git-send-email-sebastian.capella@linaro.org> References: <1393288059-18174-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=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 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;