Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3479840imu; Sun, 11 Nov 2018 16:03:40 -0800 (PST) X-Google-Smtp-Source: AJdET5cptPaFT/iD4uD541dVj9YreHuqEVZi3QO0MfPL9G6LZmS1agIF+42xXEZ9wa6FQ3+fGRH9 X-Received: by 2002:a63:31d0:: with SMTP id x199mr15380786pgx.10.1541981020163; Sun, 11 Nov 2018 16:03:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981020; cv=none; d=google.com; s=arc-20160816; b=wvymwUAwf1EBjMpw4z471f3pvavJ4/BZ1sjneuMPBuuRiyy5tXTEsdTKgQcFJHeHho /6VJIZAZDVykLl+9YAKToZdhljDKUeklX8PfWGb/mKLHyIGFc6BLM4IzfgY0YohabvV1 4uXqqqDzOsp9Fwlp5YRDHqyIgp2egmjl/ILJjcXBN9f8gcU3UEsTPoKARB0GQZv02GsI T/k6IoBqzQiS1/hFP7lIfYPsw2l0JGKG1sUNyO1dsvSKiDSRKNBrzCovMmfIMZDDdUxD Sgbvgxoeid/FCmQqlvdVquZU0K87clLLVc1zJgMlheJhcDxsYskkL06Vq7c3KfJ4G4Cf 6wTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EcT6Mwj15cuSzxzSDKA5nCTxWAR5VIqk9WwUCv11nQM=; b=HD4QFlPOmjrEiuq7MMHkR4SfQqX4sX2w/4pIKhGG7bPF072fDNJttpoICo8SbE6KJ6 NbUtW9tiTrXxPLMxwzR1k59yxw1RSyPbgzcdObObzFULhBdfsFkoQVJUeHqMQJquPgiC S/mSBGjika3oh4/SyvpR80cobxQOs1PLLaMaH2fS01uv3U3B6yDmSt6sbE/gyFnXWXlA ZSHEmS7UELLCy7kYFtKIcXK+AfDPmLMdyV0lJb0cdpYfMpSCC1VkonxNQ67LEaVyQdSi dnTrCKWLgcmK9mJCua9qcT1KalT0yEvuRaBNOLBH14AgOCFtY0zLpoFMr5fJ3nReiAul /IOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sFkigTrm; 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 z136si13651887pgz.28.2018.11.11.16.03.25; Sun, 11 Nov 2018 16:03:40 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sFkigTrm; 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 S1732220AbeKLIR4 (ORCPT + 99 others); Mon, 12 Nov 2018 03:17:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:35292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732069AbeKLIRz (ORCPT ); Mon, 12 Nov 2018 03:17:55 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 71CFC2154B; Sun, 11 Nov 2018 22:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975279; bh=Hi75c0LKVdiL/1l6+znsPEBg9B/nk32vn/+7/74jpW4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sFkigTrmQyIqreSxrdNOyIsQiwRappqI0t3pqxTPFZClcT+pAvu4WecHQaUAKf/a5 uMvFBpYLOFSWgd/zM79VVAXlHgdUca/ET2ljluyCmgLo38TGTxZCD60r7Vg2lNk+oi n51zHkpSGh8TNBG+bdlp/qMbYBO+aPnUB3Tcywh0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Niklas Cassel , Viresh Kumar Subject: [PATCH 4.19 196/361] OPP: Free OPP table properly on performance state irregularities Date: Sun, 11 Nov 2018 14:19:03 -0800 Message-Id: <20181111221647.958593639@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Viresh Kumar commit 2fbb8670b4ff4454f1c0de510f788d737edc4b90 upstream. The OPP table was freed, but not the individual OPPs which is done from _dev_pm_opp_remove_table(). Fix it by calling _dev_pm_opp_remove_table() as well. Cc: 4.18 # v4.18 Fixes: 3ba98324e81a ("PM / OPP: Get performance state using genpd helper") Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/opp/of.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -425,6 +425,7 @@ static int _of_add_opp_table_v2(struct d dev_err(dev, "Not all nodes have performance state set (%d: %d)\n", count, pstate_count); ret = -ENOENT; + _dev_pm_opp_remove_table(opp_table, dev, false); goto put_opp_table; }