linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Donnellan <andrew.donnellan@au1.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Cc: clombard@linux.vnet.ibm.com, linux-pci@vger.kernel.org,
	mrochs@linux.vnet.ibm.com, gwshan@linux.vnet.ibm.com,
	fbarrat@linux.vnet.ibm.com, mauricfo@linux.vnet.ibm.com,
	helgaas@kernel.org, imunsie@au1.ibm.com,
	felix@linux.vnet.ibm.com, ukrishn@linux.vnet.ibm.com,
	stable@vger.kernel.org
Subject: Re: [PATCH] cxl: use pcibios_free_controller_deferred() when removing vPHBs
Date: Tue, 30 Aug 2016 12:36:05 +1000	[thread overview]
Message-ID: <1472524565.2388.26.camel@kernel.crashing.org> (raw)
In-Reply-To: <3049096a-97ea-9549-ee29-ae937708cf45@au1.ibm.com>

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.

      reply	other threads:[~2016-08-30  2:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-18  7:35 [PATCH] cxl: use pcibios_free_controller_deferred() when removing vPHBs Andrew Donnellan
2016-08-18 17:02 ` Matthew R. Ochs
2016-08-19  2:59 ` Ian Munsie
2016-08-22 19:23 ` kbuild test robot
2016-08-30  1:58 ` Andrew Donnellan
2016-08-30  2:36   ` Benjamin Herrenschmidt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1472524565.2388.26.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=clombard@linux.vnet.ibm.com \
    --cc=fbarrat@linux.vnet.ibm.com \
    --cc=felix@linux.vnet.ibm.com \
    --cc=gwshan@linux.vnet.ibm.com \
    --cc=helgaas@kernel.org \
    --cc=imunsie@au1.ibm.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mauricfo@linux.vnet.ibm.com \
    --cc=mrochs@linux.vnet.ibm.com \
    --cc=stable@vger.kernel.org \
    --cc=ukrishn@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).