Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2993349AbdDZFBH (ORCPT ); Wed, 26 Apr 2017 01:01:07 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:34905 "EHLO mail-oi0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751815AbdDZFA6 (ORCPT ); Wed, 26 Apr 2017 01:00:58 -0400 MIME-Version: 1.0 In-Reply-To: <1493171393-1825-1-git-send-email-lv.zheng@intel.com> References: <1493171393-1825-1-git-send-email-lv.zheng@intel.com> From: Dan Williams Date: Tue, 25 Apr 2017 22:00:57 -0700 Message-ID: Subject: Re: [RFC PATCH] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling To: Lv Zheng Cc: "Rafael J . Wysocki" , "Rafael J . Wysocki" , Len Brown , Lv Zheng , "linux-kernel@vger.kernel.org" , Linux ACPI Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1554 Lines: 34 On Tue, Apr 25, 2017 at 6:49 PM, Lv Zheng wrote: > In the Linux kernel side, acpi_get_table() hasn't been fully balanced by > acpi_put_table() invocations. So it is not a good timing to report errors. > The strict balanced validation count check should only be enabled after > confirming that all kernel side invocations are safe. We've been living with this bug for 7 years, let's just go fix all acpi_get_table() invocations to make sure they have a corresponding acpi_put_table(). > > Thus this patch removes the fatal error but leaves the error report to > indicate the leak so that developers can notice the required engineering > change. Reported by Dan Williams, fixed by Lv Zheng. > > Reported-by: Dan Williams > Signed-off-by: Lv Zheng > --- > drivers/acpi/acpica/tbutils.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c > index 5a968a7..9e7d95cf 100644 > --- a/drivers/acpi/acpica/tbutils.c > +++ b/drivers/acpi/acpica/tbutils.c > @@ -422,7 +422,6 @@ acpi_tb_get_table(struct acpi_table_desc *table_desc, > "Table %p, Validation count is zero after increment\n", > table_desc)); > table_desc->validation_count--; > - return_ACPI_STATUS(AE_LIMIT); If you want to leave the error report turn it into a WARN_ON_ONCE() so it doesn't keep triggering, but I'd rather we just focus on the missing acpi_put_table() calls.