aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nsutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/nsutils.c')
-rw-r--r--drivers/acpi/acpica/nsutils.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
index ef753a41e087..b5b4cb72a8a8 100644
--- a/drivers/acpi/acpica/nsutils.c
+++ b/drivers/acpi/acpica/nsutils.c
@@ -530,7 +530,7 @@ acpi_ns_externalize_name(u32 internal_name_length,
530 ((num_segments > 0) ? (num_segments - 1) : 0) + 1; 530 ((num_segments > 0) ? (num_segments - 1) : 0) + 1;
531 531
532 /* 532 /*
533 * Check to see if we're still in bounds. If not, there's a problem 533 * Check to see if we're still in bounds. If not, there's a problem
534 * with internal_name (invalid format). 534 * with internal_name (invalid format).
535 */ 535 */
536 if (required_length > internal_name_length) { 536 if (required_length > internal_name_length) {
@@ -557,10 +557,14 @@ acpi_ns_externalize_name(u32 internal_name_length,
557 (*converted_name)[j++] = '.'; 557 (*converted_name)[j++] = '.';
558 } 558 }
559 559
560 (*converted_name)[j++] = internal_name[names_index++]; 560 /* Copy and validate the 4-char name segment */
561 (*converted_name)[j++] = internal_name[names_index++]; 561
562 (*converted_name)[j++] = internal_name[names_index++]; 562 ACPI_MOVE_NAME(&(*converted_name)[j],
563 (*converted_name)[j++] = internal_name[names_index++]; 563 &internal_name[names_index]);
564 acpi_ut_repair_name(&(*converted_name)[j]);
565
566 j += ACPI_NAME_SIZE;
567 names_index += ACPI_NAME_SIZE;
564 } 568 }
565 } 569 }
566 570
@@ -681,7 +685,7 @@ u32 acpi_ns_opens_scope(acpi_object_type type)
681 * \ (backslash) and ^ (carat) prefixes, and the 685 * \ (backslash) and ^ (carat) prefixes, and the
682 * . (period) to separate segments are supported. 686 * . (period) to separate segments are supported.
683 * prefix_node - Root of subtree to be searched, or NS_ALL for the 687 * prefix_node - Root of subtree to be searched, or NS_ALL for the
684 * root of the name space. If Name is fully 688 * root of the name space. If Name is fully
685 * qualified (first s8 is '\'), the passed value 689 * qualified (first s8 is '\'), the passed value
686 * of Scope will not be accessed. 690 * of Scope will not be accessed.
687 * flags - Used to indicate whether to perform upsearch or 691 * flags - Used to indicate whether to perform upsearch or
@@ -689,7 +693,7 @@ u32 acpi_ns_opens_scope(acpi_object_type type)
689 * return_node - Where the Node is returned 693 * return_node - Where the Node is returned
690 * 694 *
691 * DESCRIPTION: Look up a name relative to a given scope and return the 695 * DESCRIPTION: Look up a name relative to a given scope and return the
692 * corresponding Node. NOTE: Scope can be null. 696 * corresponding Node. NOTE: Scope can be null.
693 * 697 *
694 * MUTEX: Locks namespace 698 * MUTEX: Locks namespace
695 * 699 *