Message ID | b8107fa792de9cb442c342433043604080699fc6.1481249993.git.lv.zheng@intel.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Fri, Dec 9, 2016 at 3:21 AM, Lv Zheng <lv.zheng@intel.com> wrote: > The returned size is still used by the drivers. > > Reported-by: Dan Williams <dan.j.williams@intel.com> > Cc: Dan Williams <dan.j.williams@intel.com> > Signed-off-by: Lv Zheng <lv.zheng@intel.com> > --- > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, Rafael > From: rjwysocki@gmail.com [mailto:rjwysocki@gmail.com] On Behalf Of Rafael J. Wysocki > Subject: Re: [PATCH] ACPI / OSL: Fix a regression by returning table size via > acpi_get_table_with_size() > > On Fri, Dec 9, 2016 at 3:21 AM, Lv Zheng <lv.zheng@intel.com> wrote: > > The returned size is still used by the drivers. > > > > Reported-by: Dan Williams <dan.j.williams@intel.com> > > Cc: Dan Williams <dan.j.williams@intel.com> > > Signed-off-by: Lv Zheng <lv.zheng@intel.com> > > --- > > 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. OK, I'll also add fixes tag to it. Thanks Lv
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 returned size is still used by the drivers. Reported-by: Dan Williams <dan.j.williams@intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> --- drivers/acpi/osl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)