[PATCH v2 2/5] iommu/arm-smmu-v3: Switch to use acpi_bus_get_primary_device()

Nicolin Chen nicolinc at nvidia.com
Wed Sep 30 14:53:59 PDT 2026


On Wed, Sep 30, 2026 at 08:43:03PM +0200, Rafael J. Wysocki wrote:
> From: "Rafael J. Wysocki" <rafael.j.wysocki at intel.com>
> 
> 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 at intel.com>
 
Reviewed-by: Nicolin Chen <nicolinc at nvidia.com>



More information about the linux-arm-kernel mailing list