All of lore.kernel.org
 help / color / mirror / Atom feed
From: Erik Schmauss <erik.schmauss@intel.com>
To: linux-acpi@vger.kernel.org, rjw@rjwysocki.net
Cc: Erik Schmauss <erik.schmauss@intel.com>,
	Bob Moore <robert.moore@intel.com>
Subject: [PATCH 7/8] ACPICA: Namespace: add check to avoid null pointer dereference
Date: Mon,  8 Apr 2019 13:42:29 -0700	[thread overview]
Message-ID: <20190408204230.4335-8-erik.schmauss@intel.com> (raw)
In-Reply-To: <20190408204230.4335-1-erik.schmauss@intel.com>

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>
---
 drivers/acpi/acpica/nsalloc.c | 4 ++++
 1 file changed, 4 insertions(+)

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);
-- 
2.17.2


  parent reply	other threads:[~2019-04-08 20:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 20:42 [PATCH 0/8] ACPICA release 20190329 and 20190405 Erik Schmauss
2019-04-08 20:42 ` [PATCH 1/8] ACPICA: Rename nameseg copy macro for clarity Erik Schmauss
2019-04-08 20:42 ` [PATCH 2/8] ACPICA: Rename nameseg compare " Erik Schmauss
2019-04-08 20:42 ` [PATCH 3/8] ACPICA: Rename nameseg length macro/define " Erik Schmauss
2019-04-09  9:29   ` Rafael J. Wysocki
2019-04-11 18:36     ` Schmauss, Erik
2019-04-08 20:42 ` [PATCH 4/8] ACPICA: Namespace: remove address node from global list after method termination Erik Schmauss
2019-04-08 20:42 ` [PATCH 5/8] ACPICA: utilities: fix spelling of PCC to platform_comm_channel Erik Schmauss
2019-04-08 20:42 ` [PATCH 6/8] ACPICA: Update version to 20190329 Erik Schmauss
2019-04-08 20:42 ` Erik Schmauss [this message]
2019-04-08 20:42 ` [PATCH 8/8] ACPICA: Update version to 20190405 Erik Schmauss
2019-04-08 20:56 ` [PATCH 0/8] ACPICA release 20190329 and 20190405 Schmauss, Erik
2019-04-10 12:39 ` Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2019-04-08 20:36 Erik Schmauss
2019-04-08 20:36 ` [PATCH 7/8] ACPICA: Namespace: add check to avoid null pointer dereference Erik Schmauss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190408204230.4335-8-erik.schmauss@intel.com \
    --to=erik.schmauss@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.