Skip to content

Commit

Permalink
ACPICA: Disallow evaluation of named object types with no value
Browse files Browse the repository at this point in the history
Return AE_TYPE for objects that have no value and therefore
evaluation is undefined: Device, Event, Mutex, Region, Thermal,
and Scope.

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>
  • Loading branch information
Bob Moore authored and Len Brown committed Oct 23, 2008
1 parent 65f4692 commit b68bacf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions drivers/acpi/namespace/nseval.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,28 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info * info)
} else {
/*
* 2) Object is not a method, return its current value
*
* Disallow certain object types. For these, "evaluation" is undefined.
*/
switch (info->resolved_node->type) {
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_EVENT:
case ACPI_TYPE_MUTEX:
case ACPI_TYPE_REGION:
case ACPI_TYPE_THERMAL:
case ACPI_TYPE_LOCAL_SCOPE:

ACPI_ERROR((AE_INFO,
"[%4.4s] Evaluation of object type [%s] is not supported",
info->resolved_node->name.ascii,
acpi_ut_get_type_name(info->resolved_node->
type)));

return_ACPI_STATUS(AE_TYPE);

default:
break;
}

/*
* Objects require additional resolution steps (e.g., the Node may be
Expand Down

0 comments on commit b68bacf

Please sign in to comment.