Re: [PATCH] ata: libata-acpi: check the _GTM return object before using it

From: Niklas Cassel

Date: Mon Nov 09 2026 - 15:10:50 EST


On Wed, 04 Nov 2026 22:12:49 +0800, shao.mingyin@xxxxxxxxxx wrote:
> ata_acpi_gtm() evaluates _GTM with acpi_evaluate_object() and, after
> checking the status, dereferences output.pointer without checking it.
>
> acpi_evaluate_object() can return AE_OK with a zero-length result and a
> NULL output.pointer. A _GTM method returning a reference to a method
> local does exactly that: ACPICA clears the reference when the method
> terminates, so the caller ends up with no object. ata_acpi_gtm() then
> dereferences the NULL pointer while probing the ATA port.
>
> [...]

Applied to libata/linux.git (for-7.5), thanks!

[1/1] ata: libata-acpi: check the _GTM return object before using it
https://git.kernel.org/libata/linux/c/f710be6e

Kind regards,
Niklas