Received: by 10.213.65.68 with SMTP id h4csp250378imn; Fri, 23 Mar 2018 03:57:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELthe/W4Tcw+yl4/cBdd+7YI7BnFupdhsQEUo8/82F9MxDMiW/CCmfnZibTN8PHvAZ2v4Jtb X-Received: by 10.99.126.87 with SMTP id o23mr20599939pgn.350.1521802637596; Fri, 23 Mar 2018 03:57:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521802637; cv=none; d=google.com; s=arc-20160816; b=BxtkRWXCTkxocNDTLYc6Mg7WXhhjhYKXnk3+3WKhiTPwuyCJ52ZKalpzupe5myqb4z cfH5PzkPhftRBm4YI8fFcBk2nwJIiBe6h9WCU+wMKQHNZWQ8JVBmuIU6FxywB8N0AYP7 6JG4ghGlVzRoW9j94dBcf+gTnTUr7aFHsBT434WPF4ToBnX2IInLLR0xUquiBfvPF/5T b6tlC650xJxCIYegqMcN5eCZdiawlQaSaCcfrfv9lSZvCaQkLpUGtQiOzhtwBC8A1bEZ TArc4zFR0V26FSxBCAlwg2qq8r+vloO5DIykyBrOMf62FqsXi4totP+dg1g2jf2oQu+f cJDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Qva2j5UvkRnRmuJxtH3ZXGB3FEC7mIMwoo8TeZQeEQo=; b=RuSbJuTbHEgaElLOxM6EYrerd4qjiqGGGr1XXnTyzJwJ1FF03F6KDCEyEWfC9s2CyW rTjRdOPRPcVxNmkCF8jWTVp88/NS1QIDSU71Tz/87Czcx42LvP+v4BhxgK6sesk4L8yd zwYotBR18soP/MbBJcQ+ZxejmtJwCM/pkcXShHpRahyIhkpMUbYyENVg3kNoo+/BrXRP sY/M8fot2LKXMBM5HdhsU0u0jPsAaz8QetFisHLXKp1S7sUMzZoAGafQMY1+ZCUVMwRE VZV/3Bqb647iCIxtX/UhFJv/Qb3KD4gxccHcDvtlXlGsSDBMp60B0M/vlEUG7gOM00O/ 3jlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o197si4190059pfg.380.2018.03.23.03.57.03; Fri, 23 Mar 2018 03:57:17 -0700 (PDT) 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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755786AbeCWKNK (ORCPT + 99 others); Fri, 23 Mar 2018 06:13:10 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44610 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752469AbeCWKNH (ORCPT ); Fri, 23 Mar 2018 06:13:07 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 926B111BF; Fri, 23 Mar 2018 10:13:06 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Gleixner , Fenghua Yu , Tony Luck , Herbert Xu , "Rafael J. Wysocki" , Peter Zijlstra , Benjamin Herrenschmidt , Sebastian Siewior , Lai Jiangshan , linux-acpi@vger.kernel.org, Viresh Kumar , Michael Ellerman , Tejun Heo , "David S. Miller" , Len Brown , Sasha Levin Subject: [PATCH 4.4 12/97] ACPI/processor: Fix error handling in __acpi_processor_start() Date: Fri, 23 Mar 2018 10:53:59 +0100 Message-Id: <20180323094158.171665105@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094157.535925724@linuxfoundation.org> References: <20180323094157.535925724@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Gleixner [ Upstream commit a5cbdf693a60d5b86d4d21dfedd90f17754eb273 ] When acpi_install_notify_handler() fails the cooling device stays registered and the sysfs files created via acpi_pss_perf_init() are leaked and the function returns success. Undo acpi_pss_perf_init() and return a proper error code. Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Tony Luck Cc: Herbert Xu Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: Lai Jiangshan Cc: linux-acpi@vger.kernel.org Cc: Viresh Kumar Cc: Michael Ellerman Cc: Tejun Heo Cc: "David S. Miller" Cc: Len Brown Link: http://lkml.kernel.org/r/20170412201042.695499645@linutronix.de Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/processor_driver.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -259,6 +259,9 @@ static int __acpi_processor_start(struct if (ACPI_SUCCESS(status)) return 0; + result = -ENODEV; + acpi_pss_perf_exit(pr, device); + err_power_exit: acpi_processor_power_exit(pr); return result;