[PATCH v2 0/2] iio: validate ACPI object types before package access

From: Tristan Madani

Date: Mon Oct 26 2026 - 10:21:31 EST


From: Tristan Madani <tristan@xxxxxxxxxxxxxxxxxxx>

Two IIO drivers access ACPI package members without validating the
returned object type. Use acpi_evaluate_object_typed() to request
ACPI_TYPE_PACKAGE at evaluation time, and replace kfree() with
ACPI_FREE() for ACPI-allocated buffers.

Changes in v2:
- Use acpi_evaluate_object_typed() instead of manual post-eval type
check, as suggested by Jonathan Cameron
- Replace kfree() with ACPI_FREE() for ACPI-allocated buffers

Tristan Madani (2):
iio: light: cm32181: validate ACPI object type in
cm32181_acpi_get_cpm()
iio: imu: inv_mpu6050: validate ACPI object types in
asus_acpi_get_sensor_info()

drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 7 +++++--
drivers/iio/light/cm32181.c | 5 +++--
2 files changed, 8 insertions(+), 4 deletions(-)

--
2.47.3