From patchwork Sat Jul 20 20:48:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 2830850 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 C11219F4D4 for ; Sat, 20 Jul 2013 20:38:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE43620154 for ; Sat, 20 Jul 2013 20:38:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F1132014C for ; Sat, 20 Jul 2013 20:38:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754882Ab3GTUiH (ORCPT ); Sat, 20 Jul 2013 16:38:07 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:63849 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754860Ab3GTUiG (ORCPT ); Sat, 20 Jul 2013 16:38:06 -0400 Received: from afca87.neoplus.adsl.tpnet.pl [95.49.52.87] (HELO vostro.rjw.lan) by serwer1319399.home.pl [79.96.170.134] with SMTP (IdeaSmtpServer v0.80) id e2cf12d2bd992a4c; Sat, 20 Jul 2013 22:38:03 +0200 From: "Rafael J. Wysocki" To: Zhang Rui Cc: LKML , Linux PM list , Srinivas Pandruvada Subject: thermal / x86: Fix init error code path in package temperature driver Date: Sat, 20 Jul 2013 22:48:03 +0200 Message-ID: <1652739.TRfBKHdnvc@vostro.rjw.lan> User-Agent: KMail/4.9.5 (Linux/3.10.0+; KDE/4.9.5; x86_64; ; ) MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.3 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 From: Rafael J. Wysocki The error code path of the x86 package temperature thermal driver's initialization routine, pkg_temp_thermal_init(), makes an unbalanced call to get_online_cpus(), which causes subsequent CPU offline operations, and consequently system suspend, to permanently block in cpu_hotplug_begin() on systems where get_core_online() returns an error code. Remove the extra get_online_cpus() to fix the problem (tested on Toshiba Portege R500). Signed-off-by: Rafael J. Wysocki --- drivers/thermal/x86_pkg_temp_thermal.c | 1 - 1 file changed, 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-pm/drivers/thermal/x86_pkg_temp_thermal.c =================================================================== --- linux-pm.orig/drivers/thermal/x86_pkg_temp_thermal.c +++ linux-pm/drivers/thermal/x86_pkg_temp_thermal.c @@ -592,7 +592,6 @@ static int __init pkg_temp_thermal_init( return 0; err_ret: - get_online_cpus(); for_each_online_cpu(i) put_core_offline(i); put_online_cpus();