Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1632420
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/2] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling |
| Date | 2017-04-28 00:40 +0200 |
| Message-ID | <tB0eR-74J-3@gated-at.bofh.it> (permalink) |
| References | <tAMYi-6lN-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thursday, April 27, 2017 04:22:44 PM Lv Zheng wrote:
> 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 to be cleaned up.
>
> So it is not a good timing to report acpi_get_table() counting errors for
> this period. 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 lthe 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")
> Reported-by: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Please do not add #if 0 anywhere to the kernel code base.
If you need to drop some piece of code, just drop it.
And in this particular case validation_count should be dropped from the data
type definition too.
> ---
> drivers/acpi/acpica/tbutils.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
> index 5a968a7..8175c70 100644
> --- a/drivers/acpi/acpica/tbutils.c
> +++ b/drivers/acpi/acpica/tbutils.c
> @@ -418,11 +418,13 @@ acpi_tb_get_table(struct acpi_table_desc *table_desc,
>
> table_desc->validation_count++;
> if (table_desc->validation_count == 0) {
> + table_desc->validation_count--;
> +#if 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);
> +#endif
> }
>
> *out_table = table_desc->pointer;
>
Thanks,
Rafael
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/2] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling Lv Zheng <lv.zheng@intel.com> - 2017-04-27 10:30 +0200
Re: [PATCH v2 1/2] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-04-28 00:40 +0200
RE: [PATCH v2 1/2] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling "Zheng, Lv" <lv.zheng@intel.com> - 2017-04-28 03:30 +0200
RE: [PATCH v2 1/2] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling "Zheng, Lv" <lv.zheng@intel.com> - 2017-04-28 06:00 +0200
[PATCH v2 1/4] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling Lv Zheng <lv.zheng@intel.com> - 2017-04-28 07:30 +0200
[PATCH v3 1/4] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling Lv Zheng <lv.zheng@intel.com> - 2017-04-28 07:40 +0200
[PATCH v3 4/4] ACPI: Fix memory mapping leaks in current sysfs dumpable ACPI tables support Lv Zheng <lv.zheng@intel.com> - 2017-04-28 07:40 +0200
[PATCH v3 3/4] ACPI: sysfs: Fix acpi_get_table() leak Lv Zheng <lv.zheng@intel.com> - 2017-04-28 07:40 +0200
[PATCH v3 2/4] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently Lv Zheng <lv.zheng@intel.com> - 2017-04-28 07:40 +0200
Re: [PATCH v3 2/4] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-04-28 23:10 +0200
RE: [PATCH v3 2/4] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently "Zheng, Lv" <lv.zheng@intel.com> - 2017-05-04 09:20 +0200
Re: [PATCH v3 2/4] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently Dan Williams <dan.j.williams@intel.com> - 2017-05-04 17:50 +0200
RE: [PATCH v3 2/4] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently "Zheng, Lv" <lv.zheng@intel.com> - 2017-05-05 03:00 +0200
Re: [PATCH v3 2/4] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-05-05 22:50 +0200
RE: [PATCH v3 2/4] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently "Zheng, Lv" <lv.zheng@intel.com> - 2017-05-09 04:00 +0200
[PATCH v4 3/4] ACPI: sysfs: Fix acpi_get_table() leak Lv Zheng <lv.zheng@intel.com> - 2017-05-09 08:00 +0200
[PATCH v4 4/4] ACPI: Fix memory mapping leaks in current sysfs dumpable ACPI tables support Lv Zheng <lv.zheng@intel.com> - 2017-05-09 08:00 +0200
[PATCH v4 2/4] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently Lv Zheng <lv.zheng@intel.com> - 2017-05-09 08:00 +0200
[PATCH v4 1/4] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling Lv Zheng <lv.zheng@intel.com> - 2017-05-09 08:00 +0200
csiph-web