Re: [PATCH] PCI: host-generic: Fix NULL pointer dereference on 32-bit CAM systems

From: Manivannan Sadhasivam

Date: Mon Jul 20 2026 - 09:44:21 EST



On Thu, 09 Jul 2026 14:24:46 +0200, Steffen Persvold wrote:
> On 32-bit systems the config space is too large to ioremap in one go, so
> pci_ecam_create() maps each bus segment separately and relies on the
> ->add_bus callback (pci_ecam_add_bus) to populate the per-bus mapping in
> cfg->winp[]. pci_ecam_map_bus() then uses that mapping as the base for
> every config access.
>
> The generic ECAM ops (pci_generic_ecam_ops) already provide the ->add_bus
> and ->remove_bus callbacks, but the CAM (legacy) ops in pci-host-generic.c
> do not. As a result, on a 32-bit host using "pci-host-cam-generic" the
> per-bus mapping is never set up and the first config read dereferences a
> NULL base, crashing during bus enumeration:
>
> [...]

Applied, thanks!

[1/1] PCI: host-generic: Fix NULL pointer dereference on 32-bit CAM systems
commit: 008cb88edb41f3c7c8e0ed763ff9f26719830984

Best regards,
--
மணிவண்ணன் சதாசிவம்