stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] cxl: use pcibios_free_controller_deferred() when removing vPHBs
       [not found] <1471505714-30049-1-git-send-email-andrew.donnellan@au1.ibm.com>
@ 2016-08-30  1:58 ` Andrew Donnellan
  2016-08-30  2:36   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Donnellan @ 2016-08-30  1:58 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: clombard, linux-pci, mrochs, gwshan, fbarrat, mauricfo, helgaas,
	imunsie, felix, ukrishn, stable, Benjamin Herrenschmidt

Hi stable team,

The following patch, which ended up upstream as 
6f38a8b9a45833495dc878c335c5431cd98a16ed:

On 18/08/16 17:35, Andrew Donnellan 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@vger.kernel.org
> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
>
> ---
>
> This patch requires http://patchwork.ozlabs.org/patch/658324/. It should go
> through the powerpc tree.

This depends on 2dd9c11b9d4dfbd6c070eab7b81197f65e82f1a0 which didn't 
end up being tagged as cc: stable. It also ended up being applied in the 
wrong order in the powerpc/fixes tree...


Thanks,
-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com  IBM Australia Limited


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] cxl: use pcibios_free_controller_deferred() when removing vPHBs
  2016-08-30  1:58 ` [PATCH] cxl: use pcibios_free_controller_deferred() when removing vPHBs Andrew Donnellan
@ 2016-08-30  2:36   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2016-08-30  2:36 UTC (permalink / raw)
  To: Andrew Donnellan, linuxppc-dev
  Cc: clombard, linux-pci, mrochs, gwshan, fbarrat, mauricfo, helgaas,
	imunsie, felix, ukrishn, stable

On Tue, 2016-08-30 at 11:58 +1000, Andrew Donnellan wrote:
> Hi stable team,
> 
> The following patch, which ended up upstream as 
> 6f38a8b9a45833495dc878c335c5431cd98a16ed:
> 
> On 18/08/16 17:35, Andrew Donnellan 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@vger.kernel.org
> > > > Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> > 
> > ---
> > 
> > > > This patch requires http://patchwork.ozlabs.org/patch/658324/. It should go
> > through the powerpc tree.
> 
> This depends on 2dd9c11b9d4dfbd6c070eab7b81197f65e82f1a0 which didn't 
> end up being tagged as cc: stable. It also ended up being applied in the 
> wrong order in the powerpc/fixes tree...

My fault. Best at this point is to also apply 2dd9c11b9d4dfbd6c070eab7b81197f65e82f1a0
to stable.

Cheers,
Ben.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-30  2:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1471505714-30049-1-git-send-email-andrew.donnellan@au1.ibm.com>
2016-08-30  1:58 ` [PATCH] cxl: use pcibios_free_controller_deferred() when removing vPHBs Andrew Donnellan
2016-08-30  2:36   ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).