Message ID | 1449646321-26857-1-git-send-email-alex.hung@canonical.com |
---|---|
State | Accepted |
Headers | show |
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@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@canonical.com>
On 2015年12月09日 15: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@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: Ivan Hu <ivan.hu@canonical.com>
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:
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@canonical.com> --- src/acpi/fpdt/fpdt.c | 4 ++++ 1 file changed, 4 insertions(+)