From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754585AbdEIF5l (ORCPT ); Tue, 9 May 2017 01:57:41 -0400 Received: from mga07.intel.com ([134.134.136.100]:19290 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbdEIF5j (ORCPT ); Tue, 9 May 2017 01:57:39 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,312,1491289200"; d="scan'208";a="1128097176" From: Lv Zheng To: "Rafael J . Wysocki" , "Rafael J . Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, stable@vger.kernel.org, Anush Seetharaman , Dan Williams Subject: [PATCH v4 1/4] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling Date: Tue, 9 May 2017 13:57:31 +0800 Message-Id: <03ff0e3d2a01c2de1d00ed0475310d8cfd87d2a1.1494309338.git.lv.zheng@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <5361b51c7c257b3216475018a3a5cc4f8b6b21c6.1493281247.git.lv.zheng@intel.com> References: <5361b51c7c257b3216475018a3a5cc4f8b6b21c6.1493281247.git.lv.zheng@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the Linux kernel side, acpi_get_table() clones haven't been fully balanced by acpi_put_table() invocations. In ACPICA side, due to the design change, there are also unbalanced acpi_get_table_by_index() invocations requiring special care. So it is not a good timing to report acpi_get_table() counting errors. The strict balanced validation count check should only be enabled after confirming that all invocations are safe and compliant to their designed purposes. Thus this patch removes the fatal error along with the error report to fix this issue. Reported by Dan Williams, fixed by Lv Zheng. Fixes: 174cc7187e6f ("ACPICA: Tables: Back port acpi_get_table_with_size() and early_acpi_os_unmap_memory() from Linux kernel") Cc: Reported-by: Anush Seetharaman Reported-by: Dan Williams Cc: Anush Seetharaman Cc: Dan Williams Signed-off-by: Lv Zheng --- drivers/acpi/acpica/tbutils.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 5a968a7..7abe665 100644 --- a/drivers/acpi/acpica/tbutils.c +++ b/drivers/acpi/acpica/tbutils.c @@ -418,11 +418,7 @@ acpi_tb_get_table(struct acpi_table_desc *table_desc, table_desc->validation_count++; if (table_desc->validation_count == 0) { - ACPI_ERROR((AE_INFO, - "Table %p, Validation count is zero after increment\n", - table_desc)); table_desc->validation_count--; - return_ACPI_STATUS(AE_LIMIT); } *out_table = table_desc->pointer; -- 2.7.4