Re: [PATCH] CPPC: Fix potential ptr leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, October 23, 2015 05:02:52 AM Ashwin Chaugule wrote:
> The patch 337aadff8e45: "ACPI: Introduce CPU performance controls
> using CPPC" from Oct 2, 2015, leads to the following static checker
> warning:
> 
>         drivers/acpi/cppc_acpi.c:527 acpi_cppc_processor_probe()
>         warn: overwrite may leak 'cpc_ptr'
> 
> Fix warning by removing bogus per cpu ptr dereference.
> 
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Ashwin Chaugule <ashwin.chaugule@xxxxxxxxxx>
> ---
>  drivers/acpi/cppc_acpi.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
> index 0bbf84b..8ca4c2c 100644
> --- a/drivers/acpi/cppc_acpi.c
> +++ b/drivers/acpi/cppc_acpi.c
> @@ -524,7 +524,6 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
>  	return 0;
>  
>  out_free:
> -	cpc_ptr = per_cpu(cpc_desc_ptr, pr->id);
>  	kfree(cpc_ptr);
>  
>  out_buf_free:

Applied, thanks!

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux