Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1543774

Re: [PATCH] ACPI/CPC: Don't try to clean up uninitialized CPC data

From "Prakash, Prashanth" <pprakash@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH] ACPI/CPC: Don't try to clean up uninitialized CPC data
Date 2016-12-16 23:00 +0100
Message-ID <sP8HL-FW-23@gated-at.bofh.it> (permalink)
References <sP5JT-7j4-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <boris.ostrovsky@oracle.com>
> ---
>  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

--
Thanks,
Prashanth

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] ACPI/CPC: Don't try to clean up uninitialized CPC data Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-12-16 19:50 +0100
  Re: [PATCH] ACPI/CPC: Don't try to clean up uninitialized CPC data "Prakash, Prashanth" <pprakash@codeaurora.org> - 2016-12-16 23:00 +0100
    Re: [PATCH] ACPI/CPC: Don't try to clean up uninitialized CPC data Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-12-16 23:10 +0100

csiph-web