[PATCH] powerpc/iommu: Fix notifiers being shared by PCI and VIO buses
Michael Ellerman
patch-notifications at ellerman.id.au
Thu Aug 31 14:02:30 AEST 2023
On Wed, 22 Mar 2023 14:53:22 +1100, Russell Currey wrote:
> fail_iommu_setup() registers the fail_iommu_bus_notifier struct to both
> PCI and VIO buses. struct notifier_block is a linked list node, so this
> causes any notifiers later registered to either bus type to also be
> registered to the other since they share the same node.
>
> This causes issues in (at least) the vgaarb code, which registers a
> notifier for PCI buses. pci_notify() ends up being called on a vio
> device, converted with to_pci_dev() even though it's not a PCI device,
> and finally makes a bad access in vga_arbiter_add_pci_device() as
> discovered with KASAN:
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/iommu: Fix notifiers being shared by PCI and VIO buses
https://git.kernel.org/powerpc/c/c37b6908f7b2bd24dcaaf14a180e28c9132b9c58
cheers
More information about the Linuxppc-dev
mailing list