[PATCH] cxl: use pcibios_free_controller_deferred() when removing vPHBs

Matthew R. Ochs mrochs at linux.vnet.ibm.com
Fri Aug 19 03:02:42 AEST 2016

> On Aug 18, 2016, at 2:35 AM, Andrew Donnellan <andrew.donnellan at au1.ibm.com> wrote:
> When cxl removes a vPHB, it's possible that the pci_controller may be freed
> before all references to the devices on the vPHB have been released. This
> in turn causes an invalid memory access when the devices are eventually
> released, as pcibios_release_device() attempts to call the phb's
> release_device hook.
> In cxl_pci_vphb_remove(), remove the existing call to
> pcibios_free_controller(). Instead, use
> pcibios_free_controller_deferred() to free the pci_controller after all
> devices have been released. Export pci_set_host_bridge_release() so we can
> do this.
> Cc: stable at vger.kernel.org
> Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

Reviewed-by: Matthew R. Ochs <mrochs at linux.vnet.ibm.com>

More information about the Linuxppc-dev mailing list