From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754002AbcLIDs5 (ORCPT ); Thu, 8 Dec 2016 22:48:57 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33560 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752374AbcLIDsz (ORCPT ); Thu, 8 Dec 2016 22:48:55 -0500 MIME-Version: 1.0 In-Reply-To: References: From: "Rafael J. Wysocki" Date: Fri, 9 Dec 2016 04:48:53 +0100 X-Google-Sender-Auth: 01JqDKRYBwCB-n5nl6Yj4xk5uNM Message-ID: Subject: Re: [PATCH] ACPI / OSL: Fix a regression by returning table size via acpi_get_table_with_size() To: Lv Zheng Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Len Brown , Lv Zheng , Linux Kernel Mailing List , ACPI Devel Maling List , Dan Williams Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 9, 2016 at 3:21 AM, Lv Zheng wrote: > The returned size is still used by the drivers. > > Reported-by: Dan Williams > Cc: Dan Williams > Signed-off-by: Lv Zheng > --- > drivers/acpi/osl.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c > index 5bef0f65..adf1ec4 100644 > --- a/drivers/acpi/osl.c > +++ b/drivers/acpi/osl.c > @@ -445,8 +445,12 @@ void __ref acpi_os_unmap_memory(void *virt, acpi_size size) > > status = acpi_get_table(signature, instance, out_table); > if (ACPI_SUCCESS(status)) { > - /* No longer used by early_acpi_os_unmap_memory() */ > - *tbl_size = 0; > + /* > + * No longer used by early_acpi_os_unmap_memory(), but still > + * used by the ACPI table drivers. > + */ > + if (*out_table) > + *tbl_size = (*out_table)->length; > } > > return (status); > -- The changelog doesn't explain anything. Please say (a) what the problem is and (b) how it is being addressed by your patch. Thanks, Rafael