Skip to content

Commit 6a54eba

Browse files
Erik Kanedarafaeljw
authored andcommitted
ACPICA: Do not increment operation_region reference counts for field units
ACPICA commit e17b28cfcc31918d0db9547b6b274b09c413eb70 Object reference counts are used as a part of ACPICA's garbage collection mechanism. This mechanism keeps track of references to heap-allocated structures such as the ACPI operand objects. Recent server firmware has revealed that this reference count can overflow on large servers that declare many field units under the same operation_region. This occurs because each field unit declaration will add a reference count to the source operation_region. This change solves the reference count overflow for operation_regions objects by preventing fieldunits from incrementing their operation_region's reference count. Each operation_region's reference count will not be changed by named objects declared under the Field operator. During namespace deletion, the operation_region namespace node will be deleted and each fieldunit will be deleted without touching the deleted operation_region object. Link: acpica/acpica@e17b28cf Signed-off-by: Erik Kaneda <[email protected]> Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 10cfde5 commit 6a54eba

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

drivers/acpi/acpica/exprep.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,6 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
473473
(u8)access_byte_width;
474474
}
475475
}
476-
/* An additional reference for the container */
477-
478-
acpi_ut_add_reference(obj_desc->field.region_obj);
479-
480476
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
481477
"RegionField: BitOff %X, Off %X, Gran %X, Region %p\n",
482478
obj_desc->field.start_field_bit_offset,

drivers/acpi/acpica/utdelete.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,6 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
568568
next_object = object->buffer_field.buffer_obj;
569569
break;
570570

571-
case ACPI_TYPE_LOCAL_REGION_FIELD:
572-
573-
next_object = object->field.region_obj;
574-
break;
575-
576571
case ACPI_TYPE_LOCAL_BANK_FIELD:
577572

578573
next_object = object->bank_field.bank_obj;
@@ -613,6 +608,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
613608
}
614609
break;
615610

611+
case ACPI_TYPE_LOCAL_REGION_FIELD:
616612
case ACPI_TYPE_REGION:
617613
default:
618614

0 commit comments

Comments
 (0)