diff options
Diffstat (limited to 'drivers/acpi/acpica/nsprepkg.c')
-rw-r--r-- | drivers/acpi/acpica/nsprepkg.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/nsprepkg.c b/drivers/acpi/acpica/nsprepkg.c index 68f725839eb6..1b13b921dda9 100644 --- a/drivers/acpi/acpica/nsprepkg.c +++ b/drivers/acpi/acpica/nsprepkg.c | |||
@@ -316,6 +316,45 @@ acpi_ns_check_package(struct acpi_evaluate_info *info, | |||
316 | acpi_ns_check_package_list(info, package, elements, count); | 316 | acpi_ns_check_package_list(info, package, elements, count); |
317 | break; | 317 | break; |
318 | 318 | ||
319 | case ACPI_PTYPE2_UUID_PAIR: | ||
320 | |||
321 | /* The package must contain pairs of (UUID + type) */ | ||
322 | |||
323 | if (count & 1) { | ||
324 | expected_count = count + 1; | ||
325 | goto package_too_small; | ||
326 | } | ||
327 | |||
328 | while (count > 0) { | ||
329 | status = acpi_ns_check_object_type(info, elements, | ||
330 | package->ret_info. | ||
331 | object_type1, 0); | ||
332 | if (ACPI_FAILURE(status)) { | ||
333 | return (status); | ||
334 | } | ||
335 | |||
336 | /* Validate length of the UUID buffer */ | ||
337 | |||
338 | if ((*elements)->buffer.length != 16) { | ||
339 | ACPI_WARN_PREDEFINED((AE_INFO, | ||
340 | info->full_pathname, | ||
341 | info->node_flags, | ||
342 | "Invalid length for UUID Buffer")); | ||
343 | return (AE_AML_OPERAND_VALUE); | ||
344 | } | ||
345 | |||
346 | status = acpi_ns_check_object_type(info, elements + 1, | ||
347 | package->ret_info. | ||
348 | object_type2, 0); | ||
349 | if (ACPI_FAILURE(status)) { | ||
350 | return (status); | ||
351 | } | ||
352 | |||
353 | elements += 2; | ||
354 | count -= 2; | ||
355 | } | ||
356 | break; | ||
357 | |||
319 | default: | 358 | default: |
320 | 359 | ||
321 | /* Should not get here if predefined info table is correct */ | 360 | /* Should not get here if predefined info table is correct */ |