Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1298884
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 36/42] ACPICA: Events: Fix an issue that region object is re-attached to another scope when it is already attached |
| Date | 2015-12-29 07:10 +0100 |
| Message-ID | <qKVDQ-4Xs-9@gated-at.bofh.it> (permalink) |
| References | <qKVu9-4Eg-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
ACPICA commit 6ebcb24d3225b6c7715a3ce061c327b4c3a6b76e
The logic in acpi_ev_attach_region() is not correct, it can break address
space handler link. This patch fixes this problem. But be aware that this
fix must be applied along with a region object race issue fix. Lv Zheng.
Link: https://github.com/acpica/acpica/commit/6ebcb24d
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/evregion.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/acpi/acpica/evregion.c b/drivers/acpi/acpica/evregion.c
index 6717e57..19a4e69 100644
--- a/drivers/acpi/acpica/evregion.c
+++ b/drivers/acpi/acpica/evregion.c
@@ -504,6 +504,12 @@ acpi_ev_attach_region(union acpi_operand_object *handler_obj,
ACPI_FUNCTION_TRACE(ev_attach_region);
+ /* Install the region's handler */
+
+ if (region_obj->region.handler) {
+ return_ACPI_STATUS(AE_ALREADY_EXISTS);
+ }
+
ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
"Adding Region [%4.4s] %p to address handler %p [%s]\n",
acpi_ut_get_node_name(region_obj->region.node),
@@ -515,13 +521,6 @@ acpi_ev_attach_region(union acpi_operand_object *handler_obj,
region_obj->region.next = handler_obj->address_space.region_list;
handler_obj->address_space.region_list = region_obj;
-
- /* Install the region's handler */
-
- if (region_obj->region.handler) {
- return_ACPI_STATUS(AE_ALREADY_EXISTS);
- }
-
region_obj->region.handler = handler_obj;
acpi_ut_add_reference(handler_obj);
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/42] ACPICA: 20151218 Release Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:00 +0100
[PATCH 24/42] ACPICA: Tools: Add spacing and missing options in acpibin tool Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:00 +0100
[PATCH 21/42] ACPICA: Namespace: Add scope information to the simple object repair mechanism Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:00 +0100
[PATCH 17/42] ACPICA: Concatenate operator: Add extensions to support all ACPI objects Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:00 +0100
[PATCH 13/42] ACPICA: Debugger: Remove some unecessary NULL checks Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:00 +0100
[PATCH 03/42] ACPICA: Namespace: Fix wrong error log Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:00 +0100
[PATCH 11/42] ACPICA: Disassembler/tools: Support for multiple ACPI tables in one file Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:00 +0100
[PATCH 06/42] ACPICA: Add "const" to some functions that return fixed strings Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:00 +0100
[PATCH 10/42] ACPICA: acpiexec: Add support for AML files containing multiple tables Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:00 +0100
[PATCH 05/42] ACPICA: Fix SyncLevel support interaction with method auto-serialization Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:00 +0100
[PATCH 12/42] ACPICA: iasl/acpiexec: Update input file handling and verification Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:00 +0100
[PATCH 15/42] ACPICA: Add comment explaining _SUB removal Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:00 +0100
[PATCH 40/42] ACPICA: Add "root node" case to the ACPI name repair code Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 38/42] ACPICA: Events: Enhance acpi_ev_execute_reg_method() to ensure no _REG evaluations can happen during OS early boot stages Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 41/42] ACPICA: Add per-table execution of module-level code Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 36/42] ACPICA: Events: Fix an issue that region object is re-attached to another scope when it is already attached Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 28/42] ACPICA: Parser: Fix for SuperName method invocation Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 32/42] ACPICA: Cleanup code related to the per-table module level improvement Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 30/42] ACPICA: Update internal #defines for ObjectType operator. No functional change Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 33/42] ACPICA: Events: Deploys acpi_ev_find_region_handler() Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 39/42] ACPICA: Events: Introduce ACPI_REG_DISCONNECT invocation to acpi_ev_execute_reg_methods() Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 26/42] ACPICA: iasl/Disassembler: Support ASL ElseIf operator Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 31/42] ACPICA: Update for CondRefOf and RefOf operators Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 27/42] ACPICA: Parser: Add constants for internal namepath function Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 37/42] ACPICA: Events: Split acpi_ev_associate_reg_method() from region initialization code Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 34/42] ACPICA: Events: Uses common_notify for address space handlers Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 29/42] ACPICA: Update parameter type for ObjectType operator Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 35/42] ACPICA: Utilities: Reorder initialization code Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
[PATCH 42/42] ACPICA: Update version to 20151218 Lv Zheng <lv.zheng@intel.com> - 2015-12-29 07:10 +0100
Re: [PATCH 00/42] ACPICA: 20151218 Release "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-01-01 03:40 +0100
Re: [PATCH 00/42] ACPICA: 20151218 Release "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-01-01 04:00 +0100
csiph-web