Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0de22bd authored by Lin Ming's avatar Lin Ming Committed by Len Brown
Browse files

ACPICA: Windows compatibility fix: same buffer/string store

Fix a compatibility issue when the same buffer or string is
stored to itself. This has been seen in the field. Previously,
ACPICA would zero out the buffer/string. Now, the operation is
treated as a NOP.

http://bugzilla.acpica.org/show_bug.cgi?id=803



Reported-by: default avatarRezwanul Kabir <Rezwanul_Kabir@Dell.com>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 326ba501
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -70,6 +70,12 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc,


	ACPI_FUNCTION_TRACE_PTR(ex_store_buffer_to_buffer, source_desc);
	ACPI_FUNCTION_TRACE_PTR(ex_store_buffer_to_buffer, source_desc);


	/* If Source and Target are the same, just return */

	if (source_desc == target_desc) {
		return_ACPI_STATUS(AE_OK);
	}

	/* We know that source_desc is a buffer by now */
	/* We know that source_desc is a buffer by now */


	buffer = ACPI_CAST_PTR(u8, source_desc->buffer.pointer);
	buffer = ACPI_CAST_PTR(u8, source_desc->buffer.pointer);
@@ -161,6 +167,12 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc,


	ACPI_FUNCTION_TRACE_PTR(ex_store_string_to_string, source_desc);
	ACPI_FUNCTION_TRACE_PTR(ex_store_string_to_string, source_desc);


	/* If Source and Target are the same, just return */

	if (source_desc == target_desc) {
		return_ACPI_STATUS(AE_OK);
	}

	/* We know that source_desc is a string by now */
	/* We know that source_desc is a string by now */


	buffer = ACPI_CAST_PTR(u8, source_desc->string.pointer);
	buffer = ACPI_CAST_PTR(u8, source_desc->string.pointer);