Re: [PATCH] iommu/amd: Fix NULL pointer dereference for GPUs without upstream bridge

From: Vasant Hegde

Date: Wed Nov 04 2026 - 22:37:51 EST




On 11/3/2026 8:46 PM, Jean-Christophe Guillain wrote:
> [You don't often get email from jean-christophe@xxxxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> pci_upstream_bridge() can return NULL for devices without an upstream
> bridge. The AMD GPU identity mapping quirk dereferences the returned
> pointer unconditionally, causing a kernel panic during boot.
>
> Check the pointer before accessing the bridge vendor ID.
>
> This fixes a boot regression on a Lenovo system with an AMD PRO
> A10-9700E APU. The system now boots with AMD IOMMU enabled.
>
> Fixes: bf5bdfd1f8d4 ("iommu/amd: Force identity mode for selected GPUs only")
>
> Signed-off-by: Jean-Christophe Guillain <jean-christophe@xxxxxxxxxxxx>

Thanks Jean! Queued for rc.

-Vasant