summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tables/tbxface.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tables/tbxface.c b/tables/tbxface.c
index ba0ec0f7b2552..b3e09a0271f6b 100644
--- a/tables/tbxface.c
+++ b/tables/tbxface.c
@@ -300,10 +300,14 @@ AcpiReallocateRootTable (
ACPI_MEMCPY (Tables, AcpiGbl_RootTableList.Tables, CurrentSize);
- /* Update the root table descriptor */
-
+ /*
+ * Update the root table descriptor. The new size will be the current
+ * number of tables plus the increment, independent of the reserved
+ * size of the original table list.
+ */
AcpiGbl_RootTableList.Tables = Tables;
- AcpiGbl_RootTableList.Size += ACPI_ROOT_TABLE_SIZE_INCREMENT;
+ AcpiGbl_RootTableList.Size =
+ AcpiGbl_RootTableList.Count + ACPI_ROOT_TABLE_SIZE_INCREMENT;
AcpiGbl_RootTableList.Flags =
ACPI_ROOT_ORIGIN_ALLOCATED | ACPI_ROOT_ALLOW_RESIZE;