Re: [PATCH] ACPICA: Disassembler: Fix missing decrement reference when attach operand_object failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 25, 2022 at 4:13 AM Wang ShaoBo <bobo.shaobowang@xxxxxxxxxx> wrote:
>
> The acpi_operand_object object's reference count has not been decremented
> if attached to associated value failed, so may cause this object cannot be
> released forever, this add acpi_ut_remove_reference() to handle reference
> decrement.
>
> Fixes: 6ccd7b5acc41 ("ACPICA: Disassembler: Add support for Operation Region externals")
> Signed-off-by: Wang ShaoBo <bobo.shaobowang@xxxxxxxxxx>

Please submit ACPICA changes to the upstream project on GitHub.

Thanks!

> ---
>  drivers/acpi/acpica/dsfield.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
> index de175f1b4beb..3a3d3ab3e2c3 100644
> --- a/drivers/acpi/acpica/dsfield.c
> +++ b/drivers/acpi/acpica/dsfield.c
> @@ -93,6 +93,9 @@ acpi_ds_create_external_region(acpi_status lookup_status,
>
>         obj_desc->region.node = *node;
>         status = acpi_ns_attach_object(*node, obj_desc, ACPI_TYPE_REGION);
> +       if (ACPI_FAILURE(status))
> +               acpi_ut_remove_reference(obj_desc);
> +
>         return (status);
>  }
>  #endif
> --
> 2.25.1
>



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux