Skip to content

Commit ab317b3

Browse files
committed
Merge tag 'acpi-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fixes from Rafael Wysocki: "These fix two issues that may lead to attempts to use memory that has been freed already. Specifics: - Drop __exit annotation from einj_remove() in the ACPI APEI code because this function can be called during runtime (Arnd Bergmann) - Make acpi_db_walk_for_fields() check acpi_evaluate_object() return value to avoid accessing memory that has been freed (Nikita Kiryushin)" * tag 'acpi-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPICA: debugger: check status of acpi_evaluate_object() in acpi_db_walk_for_fields() ACPI: APEI: EINJ: mark remove callback as non-__exit
2 parents 1096bc9 + 6af7163 commit ab317b3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

drivers/acpi/acpica/dbnames.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,12 @@ acpi_db_walk_for_fields(acpi_handle obj_handle,
550550
ACPI_FREE(buffer.pointer);
551551

552552
buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER;
553-
acpi_evaluate_object(obj_handle, NULL, NULL, &buffer);
554-
553+
status = acpi_evaluate_object(obj_handle, NULL, NULL, &buffer);
554+
if (ACPI_FAILURE(status)) {
555+
acpi_os_printf("Could Not evaluate object %p\n",
556+
obj_handle);
557+
return (AE_OK);
558+
}
555559
/*
556560
* Since this is a field unit, surround the output in braces
557561
*/

drivers/acpi/apei/einj-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ static int __init einj_probe(struct platform_device *pdev)
851851
return rc;
852852
}
853853

854-
static void __exit einj_remove(struct platform_device *pdev)
854+
static void einj_remove(struct platform_device *pdev)
855855
{
856856
struct apei_exec_context ctx;
857857

0 commit comments

Comments
 (0)