diff options
author | Bob Moore <robert.moore@intel.com> | 2013-09-22 21:51:58 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-23 19:46:24 -0400 |
commit | d53d820741806a5488d0f002b61765deb58371f3 (patch) | |
tree | 501ab23a82b085e68ad3a440f9a97fb62e0c3354 /drivers/acpi/acpica/nsxfeval.c | |
parent | 1f5210a1e6c21ef850a290bac2a85ae1da2f0c2e (diff) |
ACPICA: Validate start object for acpi_walk_namespace.
Perform a sanity check on the start object to prevent problems
later. ACPICA BZ 1025.
This patch only adds additional input parameter validation, no actual
kernel suffering has been discovered.
Buglink: http://bugs.acpica.org/show_bug.cgi?id=1025
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nsxfeval.c')
-rw-r--r-- | drivers/acpi/acpica/nsxfeval.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index b38b4b07f86e..481a6b4a9b2f 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c | |||
@@ -605,11 +605,19 @@ acpi_walk_namespace(acpi_object_type type, | |||
605 | goto unlock_and_exit; | 605 | goto unlock_and_exit; |
606 | } | 606 | } |
607 | 607 | ||
608 | /* Now we can validate the starting node */ | ||
609 | |||
610 | if (!acpi_ns_validate_handle(start_object)) { | ||
611 | status = AE_BAD_PARAMETER; | ||
612 | goto unlock_and_exit2; | ||
613 | } | ||
614 | |||
608 | status = acpi_ns_walk_namespace(type, start_object, max_depth, | 615 | status = acpi_ns_walk_namespace(type, start_object, max_depth, |
609 | ACPI_NS_WALK_UNLOCK, | 616 | ACPI_NS_WALK_UNLOCK, |
610 | descending_callback, ascending_callback, | 617 | descending_callback, ascending_callback, |
611 | context, return_value); | 618 | context, return_value); |
612 | 619 | ||
620 | unlock_and_exit2: | ||
613 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | 621 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); |
614 | 622 | ||
615 | unlock_and_exit: | 623 | unlock_and_exit: |