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: 25220 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 61AC32066C for ; Tue, 25 Feb 2014 00:28:38 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id oy12sf3689811veb.1 for ; Mon, 24 Feb 2014 16:28:38 -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=ez6F2id5uCLu5/50g6wEqeRmhsIIBoKHoEyj1ZQ1Bos=; b=lRnVCv5wp8EAWBBsJkWq8yJ5zb0kPPeUo1ihSriDIu8FYVkmvkuVLkM1utIyZC5MtJ Ii7TiGqCI3ItYluyyQjmoFyrZR/XXnRmKEmmNxGzK75H1ywejS2J2E2pyjeZS1UoCh7v KDTbC8gzxqK+gqTjlNspvSu0SfGSbvdF34BZnO2YQ4B6uxxrhRZ4XwI5CsudqfggY+II kQdBOfvgP3pl0qadSpyqMp3b3LCNRytxGf0SMt5GvLT5JgzhvjJwD+4mvYAJ1Eo5QGPw VR5GqPX1qdE4a/UFl8pByA8NPqcgiIeGRrmUc78Kfz31Tz0LuyzMkWDVUPyh9c5XQgP4 Kb9A== X-Gm-Message-State: ALoCoQnf3nmtAgjkpc4SSkQbkiimSvzZdjm0TMuH+ocLtMrosLRwCNGM6ClRrDSf4j/Up04Ay1Xn X-Received: by 10.236.120.11 with SMTP id o11mr713208yhh.39.1393288118121; Mon, 24 Feb 2014 16:28:38 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.18.166 with SMTP id 35ls517014qgf.3.gmail; Mon, 24 Feb 2014 16:28:38 -0800 (PST) X-Received: by 10.58.207.13 with SMTP id ls13mr96326vec.13.1393288117963; Mon, 24 Feb 2014 16:28:37 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id xn5si6351718vdc.68.2014.02.24.16.28.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Feb 2014 16:28:37 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 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.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so6563886vcb.37 for ; Mon, 24 Feb 2014 16:28:37 -0800 (PST) X-Received: by 10.220.250.203 with SMTP id mp11mr14620463vcb.2.1393288117879; Mon, 24 Feb 2014 16:28:37 -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 u4csp99204vcz; Mon, 24 Feb 2014 16:28:37 -0800 (PST) X-Received: by 10.69.20.11 with SMTP id gy11mr2951282pbd.64.1393288117046; Mon, 24 Feb 2014 16:28:37 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fd10si18570765pad.283.2014.02.24.16.28.36; Mon, 24 Feb 2014 16:28:36 -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 S1751539AbaBYA2X (ORCPT + 11 others); 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-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: 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.178 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;