Re: [PATCH v2 3/5] ALSA: hda: cs35l41: Switch to use acpi_bus_get_primary_device()

From: Takashi Iwai

Date: Thu Oct 01 2026 - 02:22:14 EST


On Wed, 30 Sep 2026 20:42:15 +0200,
Rafael J. Wysocki wrote:
>
> From: "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx>
>
> Replace acpi_get_first_physical_node() that is slated for removal
> with acpi_bus_get_primary_device() that takes a reference to the
> device it is about to return.
>
> This addresses a potential use-after-free that may occur if the
> device returned by acpi_get_first_physical_node() is removed right
> after dropping its ACPI companion's physical_node_lock in that
> function.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> ---
>
> This patch depends on new material in linux-next.
>
> If you maintain the code updated by it, please consider ACKing it, so I can
> pick it up and remove the problematic API replaced by it during the 7.4
> merge window.
>
> In the absence of feedback, it will be resent again when 7.4-rc1 is out.
>
> Thanks!

Acked-by: Takashi Iwai <tiwai@xxxxxxx>


thanks,

Takashi