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 945225 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 6/7] ACPI / memhotplug: don't allow to eject the memory device if it is being used
0006-ACPI-memhotplug-don-t-allow-to-eject-the-memory-devi.patch (text/plain), 3.54 KB, created by
Igor Mammedov
on 2014-10-09 08:14:45 UTC
(
hide
)
Description:
[RHEL6.7 6/7] ACPI / memhotplug: don't allow to eject the memory device if it is being used
Filename:
MIME Type:
Creator:
Igor Mammedov
Created:
2014-10-09 08:14:45 UTC
Size:
3.54 KB
patch
obsolete
>From 55772ec4d1f0a0a31583d213a99583c651e5b9f7 Mon Sep 17 00:00:00 2001 >From: Igor Mammedov <imammedo@redhat.com> >Date: Wed, 8 Oct 2014 12:58:57 +0000 >Subject: [RHEL6.7 6/7] ACPI / memhotplug: don't allow to eject the memory > device if it is being used > >Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1150510 >Upstream: 65479472571fbf91502b7854be45ec0026b5229e >Brew: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=8073569 > >Conflicts with RHEL only 852ed2959 > [x86] acpi: Auto Online Hot-Added Memory > >-- > Author: Wen Congyang <wency@cn.fujitsu.com> 2012-11-16 01:10:37 > ACPI / memhotplug: don't allow to eject the memory device if it is being used > > We eject the memory device even if it is in use. It is very dangerous, > and it will cause the kernel to be panicked. > > 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 | 42 +++++++++++++++++++++++++++++++++--------- > 1 file changed, 33 insertions(+), 9 deletions(-) > >diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c >index 0576d91..8e55edf 100644 >--- a/drivers/acpi/acpi_memhotplug.c >+++ b/drivers/acpi/acpi_memhotplug.c >@@ -85,6 +85,7 @@ struct acpi_memory_info { > unsigned short caching; /* memory cache attribute */ > unsigned short write_protect; /* memory read/write attribute */ > unsigned int enabled:1; >+ unsigned int failed:1; > }; > > struct acpi_memory_device { >@@ -279,8 +280,17 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) > node = memory_add_physaddr_to_nid(info->start_addr); > > result = add_memory(node, info->start_addr, info->length); >- if (result) >+ >+ /* >+ * If the memory block has been used by the kernel, add_memory() >+ * returns -EEXIST. If add_memory() returns the other error, it >+ * means that this memory block is not used by the kernel. >+ */ >+ if (result && result != -EEXIST) { >+ info->failed = 1; > continue; >+ } >+ > #ifdef CONFIG_ACPI_HOTPLUG_MEMORY_AUTO_ONLINE > if (mem_hotadd_auto) { > err_addr = set_memory_state(info->start_addr >> >@@ -294,7 +304,12 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) > info->start_addr + info->length); > } > #endif >- info->enabled = 1; >+ if (!result) >+ info->enabled = 1; >+ /* >+ * Add num_enable even if add_memory() returns -EEXIST, so the >+ * device is bound to this driver. >+ */ > num_enabled++; > } > if (!num_enabled) { >@@ -315,21 +330,30 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) > > static int acpi_memory_remove_memory(struct acpi_memory_device *mem_device) > { >- int result; >+ int result = 0; > struct acpi_memory_info *info, *n; > > list_for_each_entry_safe(info, n, &mem_device->res_list, list) { >- if (info->enabled) { >- result = remove_memory(info->start_addr, info->length); >- if (result) >- return result; >- } >+ if (info->failed) >+ /* The kernel does not use this memory block */ >+ continue; >+ >+ if (!info->enabled) >+ /* >+ * The kernel uses this memory block, but it may be not >+ * managed by us. >+ */ >+ return -EBUSY; >+ >+ result = remove_memory(info->start_addr, info->length); >+ if (result) >+ return result; > > list_del(&info->list); > kfree(info); > } > >- return 0; >+ return result; > } > > static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) >-- >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