Re: [PATCH v3 3/3] ACPI: bus: For platform OSC negotiate capabilities

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

 



Hi,

On Mon, Feb 28, 2022 at 12:14:46PM -0600, Mario Limonciello wrote:
> @@ -343,10 +345,34 @@ static void acpi_bus_osc_negotiate_platform_control(void)
>  	if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
>  		return;
>  
> -	if (ACPI_FAILURE(acpi_run_osc(handle, &context)))
> +	/*
> +	 * Check if bits were masked, we need to negotiate
> +	 * prevent potential endless loop by limited number of
> +	 * negotiation cycles.
> +	 */
> +	for (i = 0; i < 5; i++) {
> +		status = acpi_run_osc(handle, &context);
> +		if (ACPI_SUCCESS(status) || status == AE_SUPPORT) {

The previous patch says that AE_OK or AE_SUCCESS you need to free the
result but here we get AE_SUPPORT and you still do the kfree(). Is that
intented?

> +			capbuf_ret = context.ret.pointer;
> +			capbuf[OSC_SUPPORT_DWORD] = capbuf_ret[OSC_SUPPORT_DWORD];
> +			kfree(context.ret.pointer);
> +		}



[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