Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 945223 Details for
Bug 1150510
kernel ignores ACPI memory devices (PNP0C80) present at boot time
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[RHEL6.7 4/7] ACPI / memhotplug: fix memory leak when memory device is unbound from acpi_memhotplug
0004-ACPI-memhotplug-fix-memory-leak-when-memory-device-i.patch (text/plain), 2.86 KB, created by
Igor Mammedov
on 2014-10-09 08:13:17 UTC
(
hide
)
Description:
[RHEL6.7 4/7] ACPI / memhotplug: fix memory leak when memory device is unbound from acpi_memhotplug
Filename:
MIME Type:
Creator:
Igor Mammedov
Created:
2014-10-09 08:13:17 UTC
Size:
2.86 KB
patch
obsolete
>From a08ecb3032072da8254db9f485f4bae63c096990 Mon Sep 17 00:00:00 2001 >From: Igor Mammedov <imammedo@redhat.com> >Date: Wed, 8 Oct 2014 12:55:55 +0000 >Subject: [RHEL6.7 4/7] ACPI / memhotplug: fix memory leak when memory device > is unbound from acpi_memhotplug > >Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1150510 >Upstream: 386e52b95550db87c93455e3c0efe3cc4543f036 >Brew: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=8073569 > >-- > Author: Wen Congyang <wency@cn.fujitsu.com> 2012-11-16 01:06:06 > ACPI / memhotplug: fix memory leak when memory device is unbound from acpi_memhotplug > > We allocate memory to store acpi_memory_info, so we should free it before > freeing mem_device. > > Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> > Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> > Acked-by: David Rientjes <rientjes@google.com> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >-- > >Signed-off-by: Igor Mammedov <imammedo@redhat.com> >--- > drivers/acpi/acpi_memhotplug.c | 27 +++++++++++++++++++++------ > 1 file changed, 21 insertions(+), 6 deletions(-) > >diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c >index 0675975..21bc843 100644 >--- a/drivers/acpi/acpi_memhotplug.c >+++ b/drivers/acpi/acpi_memhotplug.c >@@ -132,12 +132,20 @@ acpi_memory_get_resource(struct acpi_resource *resource, void *context) > return AE_OK; > } > >+static void >+acpi_memory_free_device_resources(struct acpi_memory_device *mem_device) >+{ >+ struct acpi_memory_info *info, *n; >+ >+ list_for_each_entry_safe(info, n, &mem_device->res_list, list) >+ kfree(info); >+ INIT_LIST_HEAD(&mem_device->res_list); >+} >+ > static int > acpi_memory_get_device_resources(struct acpi_memory_device *mem_device) > { > acpi_status status; >- struct acpi_memory_info *info, *n; >- > > if (!list_empty(&mem_device->res_list)) > return 0; >@@ -145,9 +153,7 @@ acpi_memory_get_device_resources(struct acpi_memory_device *mem_device) > status = acpi_walk_resources(mem_device->device->handle, METHOD_NAME__CRS, > acpi_memory_get_resource, mem_device); > if (ACPI_FAILURE(status)) { >- list_for_each_entry_safe(info, n, &mem_device->res_list, list) >- kfree(info); >- INIT_LIST_HEAD(&mem_device->res_list); >+ acpi_memory_free_device_resources(mem_device); > return -EINVAL; > } > >@@ -398,6 +404,15 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) > return; > } > >+static void acpi_memory_device_free(struct acpi_memory_device *mem_device) >+{ >+ if (!mem_device) >+ return; >+ >+ acpi_memory_free_device_resources(mem_device); >+ kfree(mem_device); >+} >+ > static int acpi_memory_device_add(struct acpi_device *device) > { > int result; >@@ -462,7 +477,7 @@ static int acpi_memory_device_remove(struct acpi_device *device, int type) > if (result) > return result; > >- kfree(mem_device); >+ acpi_memory_device_free(mem_device); > > return 0; > } >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1150510
:
945218
|
945221
|
945222
| 945223 |
945224
|
945225
|
945226