From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753630AbbL2GEi (ORCPT ); Tue, 29 Dec 2015 01:04:38 -0500 Received: from mga03.intel.com ([134.134.136.65]:42319 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753481AbbL2GEc (ORCPT ); Tue, 29 Dec 2015 01:04:32 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,493,1444719600"; d="scan'208";a="871007983" From: Lv Zheng To: "Rafael J. Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , , linux-acpi@vger.kernel.org, Bob Moore Subject: [PATCH 40/42] ACPICA: Add "root node" case to the ACPI name repair code Date: Tue, 29 Dec 2015 14:04:11 +0800 Message-Id: <37c017d481b4b6dcb202619ba175009bcf5c4e2e.1451367389.git.lv.zheng@intel.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bob Moore ACPICA commit 95b40b31aa8148629fbe5de0356725fc01298003 Special-case the namespace root node, it has an unusual name. This case can occur if there are errors during the execution of module-level code. Link: https://github.com/acpica/acpica/commit/95b40b31 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- drivers/acpi/acpica/utstring.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c index 0c2e2d2..958b2f7 100644 --- a/drivers/acpi/acpica/utstring.c +++ b/drivers/acpi/acpica/utstring.c @@ -240,6 +240,14 @@ void acpi_ut_repair_name(char *name) ACPI_FUNCTION_NAME(ut_repair_name); + /* + * Special case for the root node. This can happen if we get an + * error during the execution of module-level code. + */ + if (ACPI_COMPARE_NAME(name, "\\___")) { + return; + } + ACPI_MOVE_NAME(&original_name, name); /* Check each character in the name */ -- 1.7.10