ACK: [PATCH] acpi: fpdt: add a terminate for buggy BIOS that reports zero length

Colin Ian King colin.king at canonical.com
Wed Dec 9 07:47:17 UTC 2015


On 09/12/15 07:32, Alex Hung wrote:
> On Supermicro's C7Q67, BIOS reports Performance Record Type 0 with
> zero length and it causes fpdt test to run into infinite loop.  As
> the data is considered corrupted, it is better to terminate the
> test instead of checking others.
> 
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  src/acpi/fpdt/fpdt.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/acpi/fpdt/fpdt.c b/src/acpi/fpdt/fpdt.c
> index f5e4550..0d059be 100644
> --- a/src/acpi/fpdt/fpdt.c
> +++ b/src/acpi/fpdt/fpdt.c
> @@ -203,6 +203,10 @@ static int fpdt_test1(fwts_framework *fw)
>  			break;
>  		}
>  		ptr += fpdt->length;
> +
> +		/* terminate loop for buggy BIOS */
> +		if (fpdt->length == 0)
> +			break;
>  	}
>  
>  done:
> 
Acked-by: Colin Ian King <colin.king at canonical.com>



More information about the fwts-devel mailing list