Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1353171
| From | Joshua Hunt <johunt@akamai.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 1/2] ACPI, APEI: Fix leaked resources |
| Date | 2016-03-08 17:00 +0100 |
| Message-ID | <rasdc-2OP-17@gated-at.bofh.it> (permalink) |
| References | <rasdc-2OP-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
We leak the NVS and arch resources (if used), in apei_resources_request.
They are allocated to make sure we exclude them from the APEI resources,
but they are never freed at the end of the function. Free them now.
Signed-off-by: Josh Hunt <johunt@akamai.com>
---
drivers/acpi/apei/apei-base.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
index a2c8d7a..da370e1 100644
--- a/drivers/acpi/apei/apei-base.c
+++ b/drivers/acpi/apei/apei-base.c
@@ -536,7 +536,8 @@ int apei_resources_request(struct apei_resources *resources,
goto err_unmap_ioport;
}
- return 0;
+ goto arch_res_fini;
+
err_unmap_ioport:
list_for_each_entry(res, &resources->ioport, list) {
if (res == res_bak)
@@ -551,7 +552,8 @@ err_unmap_iomem:
release_mem_region(res->start, res->end - res->start);
}
arch_res_fini:
- apei_resources_fini(&arch_res);
+ if (arch_apei_filter_addr)
+ apei_resources_fini(&arch_res);
nvs_res_fini:
apei_resources_fini(&nvs_resources);
return rc;
--
1.7.9.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/2] ACPI, APEI: Memory leaks Joshua Hunt <johunt@akamai.com> - 2016-03-08 17:00 +0100
[PATCH v2 1/2] ACPI, APEI: Fix leaked resources Joshua Hunt <johunt@akamai.com> - 2016-03-08 17:00 +0100
Re: [PATCH v2 1/2] ACPI, APEI: Fix leaked resources "Chen, Gong" <gong.chen@linux.intel.com> - 2016-03-09 02:20 +0100
[PATCH v2 2/2] ACPI, APEI, ERST: Fixed leaked resources in erst_init Joshua Hunt <johunt@akamai.com> - 2016-03-08 17:10 +0100
Re: [PATCH v2 2/2] ACPI, APEI, ERST: Fixed leaked resources in erst_init "Chen, Gong" <gong.chen@linux.intel.com> - 2016-03-09 02:20 +0100
RE: [PATCH v2 0/2] ACPI, APEI: Memory leaks "Luck, Tony" <tony.luck@intel.com> - 2016-03-11 00:00 +0100
Re: [PATCH v2 0/2] ACPI, APEI: Memory leaks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-11 00:20 +0100
Re: [PATCH v2 0/2] ACPI, APEI: Memory leaks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-11 00:00 +0100
csiph-web