[PATCH 11/13] platform/x86: hp-bioscfg: advance elem past consumed array elements in string-attributes
Muhammad Bilal <[email protected]> Mon, 3 Aug 2026 19:30:34 +0500
| Newsgroups | org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
Same defect as the companion fix to enum-attributes.c in this series:
the PREREQUISITES case consumes "size" consecutive ACPI package
elements via elem + reqs, but the outer loop only advances "elem" by
one per iteration, causing the next iteration to misread a leftover
prerequisite entry as the next property and abort the parse with
-EIO on the resulting type mismatch.
Fix by advancing "elem" by (size - 1) after the loop.
Fixes: e6c7b3e15559 ("platform/x86: hp-bioscfg: string-attributes")
Cc: [email protected]
Signed-off-by: Muhammad Bilal <[email protected]>
---
drivers/platform/x86/hp/hp-bioscfg/string-attributes.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c
index fe5a9a3a4ef1..5abec8995911 100644
--- a/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c
@@ -233,6 +233,8 @@ static int hp_populate_string_elements_from_package(union acpi_object *string_ob
kfree(str_value);
str_value = NULL;
}
+ if (size)
+ elem += size - 1;
break;
case SECURITY_LEVEL:
--
2.55.0