diff options
| author | Bob Moore <robert.moore@intel.com> | 2010-07-05 22:37:13 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2010-07-06 22:34:27 -0400 |
| commit | 09079250db4d470f75eddcce31e0229c92d6c3bf (patch) | |
| tree | c96fc293cf1954f09c101b192dbd048e6eece164 | |
| parent | 150dba38f0c3d2d5f5edc58145d202de08ed623c (diff) | |
ACPICA: Fix for Alias references within Package objects
This fixes a problem where a reference to an Alias within the
definition of a Package was not always resolved properly. Aliases
to objects like Processors, ThermalZones, etc. were resolved to the
actual object instead of a reference to the object as it should be.
Package objects are only allowed to contain integer, string,
buffer, package, and reference objects.
https://bugzilla.redhat.com/show_bug.cgi?id=608648
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
| -rw-r--r-- | drivers/acpi/acpica/dsobject.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c index 3607adcaf085..8e85f54a8e0e 100644 --- a/drivers/acpi/acpica/dsobject.c +++ b/drivers/acpi/acpica/dsobject.c | |||
| @@ -81,6 +81,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state, | |||
| 81 | { | 81 | { |
| 82 | union acpi_operand_object *obj_desc; | 82 | union acpi_operand_object *obj_desc; |
| 83 | acpi_status status; | 83 | acpi_status status; |
| 84 | acpi_object_type type; | ||
| 84 | 85 | ||
| 85 | ACPI_FUNCTION_TRACE(ds_build_internal_object); | 86 | ACPI_FUNCTION_TRACE(ds_build_internal_object); |
| 86 | 87 | ||
| @@ -172,7 +173,20 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state, | |||
| 172 | return_ACPI_STATUS(status); | 173 | return_ACPI_STATUS(status); |
| 173 | } | 174 | } |
| 174 | 175 | ||
| 175 | switch (op->common.node->type) { | 176 | /* |
| 177 | * Special handling for Alias objects. We need to setup the type | ||
| 178 | * and the Op->Common.Node to point to the Alias target. Note, | ||
| 179 | * Alias has at most one level of indirection internally. | ||
| 180 | */ | ||
| 181 | type = op->common.node->type; | ||
| 182 | if (type == ACPI_TYPE_LOCAL_ALIAS) { | ||
| 183 | type = obj_desc->common.type; | ||
| 184 | op->common.node = | ||
| 185 | ACPI_CAST_PTR(struct acpi_namespace_node, | ||
| 186 | op->common.node->object); | ||
| 187 | } | ||
| 188 | |||
| 189 | switch (type) { | ||
| 176 | /* | 190 | /* |
| 177 | * For these types, we need the actual node, not the subobject. | 191 | * For these types, we need the actual node, not the subobject. |
| 178 | * However, the subobject did not get an extra reference count above. | 192 | * However, the subobject did not get an extra reference count above. |
