diff options
author | Erik Schmauss <erik.schmauss@intel.com> | 2019-04-08 23:42:29 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-04-09 12:25:27 +0300 |
commit | df9271d69f4016c1169699de9a826745688103bd (patch) | |
tree | ee3f555533a0f80b3b32ffcf424bdc8049c91dac | |
parent | 985d5124bfb0773edb8353237e5e8ddb614c3442 (diff) | |
download | linux-df9271d69f4016c1169699de9a826745688103bd.tar.xz |
ACPICA: Namespace: add check to avoid null pointer dereference
ACPICA commit 7586a625f9c34c3169efd88470192bf63119e31a
Some ACPICA userspace tools call acpi_ut_subsystem_shutdown() during
cleanup and dereference a null pointer when cleaning up the
namespace.
Link: https://github.com/acpica/acpica/commit/7586a625
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpica/nsalloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/nsalloc.c b/drivers/acpi/acpica/nsalloc.c index 5470213b8e64..6eb63db72249 100644 --- a/drivers/acpi/acpica/nsalloc.c +++ b/drivers/acpi/acpica/nsalloc.c @@ -74,6 +74,10 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) ACPI_FUNCTION_NAME(ns_delete_node); + if (!node) { + return_VOID; + } + /* Detach an object if there is one */ acpi_ns_detach_object(node); |