Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758813AbcLPWAL (ORCPT ); Fri, 16 Dec 2016 17:00:11 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:29304 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757526AbcLPWAB (ORCPT ); Fri, 16 Dec 2016 17:00:01 -0500 Subject: Re: [PATCH] ACPI/CPC: Don't try to clean up uninitialized CPC data To: "Prakash, Prashanth" , rjw@rjwysocki.net, lenb@kernel.org References: <1481913346-16321-1-git-send-email-boris.ostrovsky@oracle.com> <274267e0-d41a-83b1-b4d6-ee7af51ace49@codeaurora.org> Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org From: Boris Ostrovsky Message-ID: <11b1b0a4-0ea6-9738-9575-5e038adf8979@oracle.com> Date: Fri, 16 Dec 2016 17:02:28 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <274267e0-d41a-83b1-b4d6-ee7af51ace49@codeaurora.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1129 Lines: 32 On 12/16/2016 04:52 PM, Prakash, Prashanth wrote: > Hi Boris, > > On 12/16/2016 11:35 AM, Boris Ostrovsky wrote: >> If acpi_cppc_processor_probe() had not executed successfully (for >> example, if _CPC object was not found) then cpc_desc_ptr for that >> processor will be invalid. >> >> Signed-off-by: Boris Ostrovsky >> --- >> drivers/acpi/cppc_acpi.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c >> index d0d0504..5bba26e 100644 >> --- a/drivers/acpi/cppc_acpi.c >> +++ b/drivers/acpi/cppc_acpi.c >> @@ -824,6 +824,8 @@ void acpi_cppc_processor_exit(struct acpi_processor *pr) >> void __iomem *addr; >> >> cpc_ptr = per_cpu(cpc_desc_ptr, pr->id); >> + if (!cpc_ptr) >> + return; >> >> /* Free all the mapped sys mem areas for this CPU */ >> for (i = 2; i < cpc_ptr->num_entries; i++) { > I think a recent patch from Sebastian fixed the same issue. > https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=9e9d68dad58c70f40f50adfeabd2fdaa39a743fd Ah, excellent! Thanks. -boris