Skip to content

Commit 0c99923

Browse files
committed
ACPICA: Avoid walking the ACPI Namespace if it is not there
ACPICA commit b1c3656ef4950098e530be68d4b589584f06cddc Prevent acpi_ns_walk_namespace() from crashing when called with start_node equal to ACPI_ROOT_OBJECT if the Namespace has not been instantiated yet and acpi_gbl_root_node is NULL. For instance, this can happen if the kernel is run with "acpi=off" in the command line. Link: acpica/acpica@b1c3656 Link: https://lore.kernel.org/linux-acpi/CAJZ5v0hJWW_vZ3wwajE7xT38aWjY7cZyvqMJpXHzUL98-SiCVQ@mail.gmail.com/ Reported-by: Hans de Goede <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent ae57857 commit 0c99923

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/acpi/acpica/nswalk.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ acpi_ns_walk_namespace(acpi_object_type type,
169169

170170
if (start_node == ACPI_ROOT_OBJECT) {
171171
start_node = acpi_gbl_root_node;
172+
if (!start_node) {
173+
return_ACPI_STATUS(AE_NO_NAMESPACE);
174+
}
172175
}
173176

174177
/* Null child means "get first node" */

0 commit comments

Comments
 (0)