diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-15 12:26:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-15 12:26:37 -0400 |
commit | ffaa5b984a9322bbd5d9a7f0814ca2ce70feebe5 (patch) | |
tree | 171ed020ae3f9034150e832c613b650e803b62fb /drivers/acpi/utilities/utobject.c | |
parent | 024b246ed24492d6c2ee14c34d742b137fce1b94 (diff) | |
parent | 0f2456236459f3ddef48a8a75d10b2d6ecf1a93d (diff) |
Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6
* 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6:
ACPI: Fix thermal shutdowns
ACPI: bounds check IRQ to prevent memory corruption
ACPI: Avoid bogus EC timeout when EC is in Polling mode
ACPI : Add the EC dmi table to fix the incorrect ECDT table
ACPI: Properly clear flags on false-positives and send uevent on sudden unplug
acpi: trivial cleanups
acer-wmi: Fix wireless and bluetooth on early AMW0 v2 laptops
ACPI: WMI: Set instance for query block calls
ACPICA: Additional error checking for pathname utilities
ACPICA: Fix possible memory leak in Unload() operator
ACPICA: Fix memory leak when deleting thermal/processor objects
Diffstat (limited to 'drivers/acpi/utilities/utobject.c')
-rw-r--r-- | drivers/acpi/utilities/utobject.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index e25484495e65..916eff399eb3 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c | |||
@@ -425,6 +425,7 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, | |||
425 | acpi_size * obj_length) | 425 | acpi_size * obj_length) |
426 | { | 426 | { |
427 | acpi_size length; | 427 | acpi_size length; |
428 | acpi_size size; | ||
428 | acpi_status status = AE_OK; | 429 | acpi_status status = AE_OK; |
429 | 430 | ||
430 | ACPI_FUNCTION_TRACE_PTR(ut_get_simple_object_size, internal_object); | 431 | ACPI_FUNCTION_TRACE_PTR(ut_get_simple_object_size, internal_object); |
@@ -484,10 +485,14 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, | |||
484 | * Get the actual length of the full pathname to this object. | 485 | * Get the actual length of the full pathname to this object. |
485 | * The reference will be converted to the pathname to the object | 486 | * The reference will be converted to the pathname to the object |
486 | */ | 487 | */ |
487 | length += | 488 | size = |
488 | ACPI_ROUND_UP_TO_NATIVE_WORD | 489 | acpi_ns_get_pathname_length(internal_object-> |
489 | (acpi_ns_get_pathname_length | 490 | reference.node); |
490 | (internal_object->reference.node)); | 491 | if (!size) { |
492 | return_ACPI_STATUS(AE_BAD_PARAMETER); | ||
493 | } | ||
494 | |||
495 | length += ACPI_ROUND_UP_TO_NATIVE_WORD(size); | ||
491 | break; | 496 | break; |
492 | 497 | ||
493 | default: | 498 | default: |