ACPICA: Add argument typechecking for all predefined ACPI names
Fully implements typechecking on all incoming arguments for all predefined names. This ensures that ACPI-related drivers are passing the correct number of arguments, each of the correct object type. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
e1405ca5eb
commit
29a241cc02
@@ -125,7 +125,7 @@ static void acpi_ps_start_trace(struct acpi_evaluate_info *info)
|
||||
}
|
||||
|
||||
if ((!acpi_gbl_trace_method_name) ||
|
||||
(acpi_gbl_trace_method_name != info->resolved_node->name.integer)) {
|
||||
(acpi_gbl_trace_method_name != info->node->name.integer)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ static void acpi_ps_stop_trace(struct acpi_evaluate_info *info)
|
||||
}
|
||||
|
||||
if ((!acpi_gbl_trace_method_name) ||
|
||||
(acpi_gbl_trace_method_name != info->resolved_node->name.integer)) {
|
||||
(acpi_gbl_trace_method_name != info->node->name.integer)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -226,15 +226,14 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
|
||||
|
||||
/* Validate the Info and method Node */
|
||||
|
||||
if (!info || !info->resolved_node) {
|
||||
if (!info || !info->node) {
|
||||
return_ACPI_STATUS(AE_NULL_ENTRY);
|
||||
}
|
||||
|
||||
/* Init for new method, wait on concurrency semaphore */
|
||||
|
||||
status =
|
||||
acpi_ds_begin_method_execution(info->resolved_node, info->obj_desc,
|
||||
NULL);
|
||||
acpi_ds_begin_method_execution(info->node, info->obj_desc, NULL);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
@@ -253,8 +252,7 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
|
||||
*/
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
|
||||
"**** Begin Method Parse/Execute [%4.4s] **** Node=%p Obj=%p\n",
|
||||
info->resolved_node->name.ascii, info->resolved_node,
|
||||
info->obj_desc));
|
||||
info->node->name.ascii, info->node, info->obj_desc));
|
||||
|
||||
/* Create and init a Root Node */
|
||||
|
||||
@@ -275,7 +273,7 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
status = acpi_ds_init_aml_walk(walk_state, op, info->resolved_node,
|
||||
status = acpi_ds_init_aml_walk(walk_state, op, info->node,
|
||||
info->obj_desc->method.aml_start,
|
||||
info->obj_desc->method.aml_length, info,
|
||||
info->pass_number);
|
||||
|
Reference in New Issue
Block a user