From patchwork Wed Feb 19 01:52:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Capella X-Patchwork-Id: 24926 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E4194203BE for ; Wed, 19 Feb 2014 01:52:58 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id at1sf32780384iec.5 for ; Tue, 18 Feb 2014 17:52:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=NmgFMFEerR7cBnhW2kB1D+zhOFKzpq/LRnaJEJbhZ50=; b=MZcNbqg6LMsr2QQRFChi5HLC8MQ1pPhXC8ZaCaROU4hx/WSUHSuHDToXqRjrCZyie1 Gcp1KIe/Y9TSd0cSwaLxJyIzUPvk5F535aJ/jDl3BF6+4twXTHVOiEL95erIs0NgTX/F TPd6KMwS9qNOept9DieCgCopDMnlf/scoTCqb28R/aXEFbaGhRKasiUuLMSqPALT7aAa tCHcUwVqKM/QY1RkoVknLswjRny1UDqyI8wiykqyG3SINSvaizZmpTNPkm6aXm3QerlZ tYuIr21ow9pva9h2BVKZ+1r2iXmWCcskPugCTAWvnLkfkKA4fnSDOVAUNhV4azpmIQfs rlNg== X-Gm-Message-State: ALoCoQl8TqMVQxhni9xe9oxJWJnTX6WbLs5tPXooaX41SelqlQjrxGHVP7ATVGCISMGeDXGfsjAX X-Received: by 10.182.246.39 with SMTP id xt7mr14236840obc.40.1392774777951; Tue, 18 Feb 2014 17:52:57 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.29.134 with SMTP id b6ls1522980qgb.91.gmail; Tue, 18 Feb 2014 17:52:57 -0800 (PST) X-Received: by 10.52.65.171 with SMTP id y11mr175672vds.52.1392774777838; Tue, 18 Feb 2014 17:52:57 -0800 (PST) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id qi7si6168172veb.34.2014.02.18.17.52.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 17:52:57 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id ie18so13663669vcb.40 for ; Tue, 18 Feb 2014 17:52:57 -0800 (PST) X-Received: by 10.52.164.137 with SMTP id yq9mr16374789vdb.33.1392774777527; Tue, 18 Feb 2014 17:52:57 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp261693vcz; Tue, 18 Feb 2014 17:52:57 -0800 (PST) X-Received: by 10.68.193.130 with SMTP id ho2mr18553078pbc.141.1392774776212; Tue, 18 Feb 2014 17:52:56 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qx4si20111557pbc.105.2014.02.18.17.52.55; Tue, 18 Feb 2014 17:52:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752544AbaBSBwy (ORCPT + 11 others); Tue, 18 Feb 2014 20:52:54 -0500 Received: from mail-pd0-f178.google.com ([209.85.192.178]:55070 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751099AbaBSBwW (ORCPT ); Tue, 18 Feb 2014 20:52:22 -0500 Received: by mail-pd0-f178.google.com with SMTP id fp1so8385334pdb.9 for ; Tue, 18 Feb 2014 17:52:21 -0800 (PST) X-Received: by 10.68.98.3 with SMTP id ee3mr36926450pbb.31.1392774741753; Tue, 18 Feb 2014 17:52:21 -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 e6sm60467550pbg.4.2014.02.18.17.52.18 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 18 Feb 2014 17:52:20 -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 , Ming Lei , Greg Kroah-Hartman Subject: [PATCH RFC v1 2/3] Fix hibernation restore hang in freeze_processes Date: Tue, 18 Feb 2014 17:52:08 -0800 Message-Id: <1392774729-3235-3-git-send-email-sebastian.capella@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392774729-3235-1-git-send-email-sebastian.capella@linaro.org> References: <1392774729-3235-1-git-send-email-sebastian.capella@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sebastian.capella@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Cc: Russ Dill Cc: Ming Lei 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;