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: 25330 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6F11920543 for ; Wed, 26 Feb 2014 00:02:35 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id n16sf204794oag.9 for ; Tue, 25 Feb 2014 16:02:34 -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=TcNu9gNDr6IVd0+wDPho0MNUzvIpTYYWsXlgOV0A89k=; b=Vj2IkUtb1UFM0q9UfLwdkKa63ryINd53JLAJz59W4iEU76A3i6nkLx85jYRGxfPklf 1H0vAaL+Z7Tz+mvAWQofZRAuPR132pGGDd4KMGBUBlx+d5CTFMS37mNYK54ldJ2RaGZD zm9msmz6pXMEKu/wgZq/mrfj67DaIBN5AJbh2SrHPn4KkGBB54gOCSv+meJ94cH4Fxn/ PDCFe/Go213tqtnbKCOvVLQ2rh9v+kolYSfp4yKDEhFy9ywyANfXUhW+jc3TlCbzXZIa M+Hh00JZpHEy3ABhwUeQrdvJkZatUk2pBriuGmvdmaxCh3Br2y9MZQFDZWh2mYoahEtG ZGnQ== X-Gm-Message-State: ALoCoQmVt0v9f7XtpNY5eOp30egOUOr/Ni/z8eMbX77BXRXmtdG1rXkPXZDWLPWPRr3Yg1bnK7k3 X-Received: by 10.42.194.5 with SMTP id dw5mr1049045icb.5.1393372954769; Tue, 25 Feb 2014 16:02:34 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.246 with SMTP id e109ls1408171qga.89.gmail; Tue, 25 Feb 2014 16:02:34 -0800 (PST) X-Received: by 10.52.179.198 with SMTP id di6mr2811009vdc.7.1393372954638; Tue, 25 Feb 2014 16:02:34 -0800 (PST) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id or7si7253923vcb.61.2014.02.25.16.02.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 16:02:34 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id oy12so1336500veb.5 for ; Tue, 25 Feb 2014 16:02:34 -0800 (PST) X-Received: by 10.221.22.71 with SMTP id qv7mr32335vcb.34.1393372954552; Tue, 25 Feb 2014 16:02:34 -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 u4csp176413vcz; Tue, 25 Feb 2014 16:02:34 -0800 (PST) X-Received: by 10.66.149.37 with SMTP id tx5mr4624528pab.81.1393372953481; Tue, 25 Feb 2014 16:02:33 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mo4si5127883pbc.351.2014.02.25.16.02.32; Tue, 25 Feb 2014 16:02:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 S1753364AbaBZACN (ORCPT + 26 others); Tue, 25 Feb 2014 19:02:13 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]:41910 "EHLO mail-pb0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751344AbaBZACI (ORCPT ); Tue, 25 Feb 2014 19:02:08 -0500 Received: by mail-pb0-f45.google.com with SMTP id un15so149572pbc.32 for ; Tue, 25 Feb 2014 16:02:08 -0800 (PST) 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-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.128.174 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 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;