From: Michael Ellerman <mpe@ellerman.id.au>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>,
Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 2/4] powerpc/powernv: Fix stale PE primary bus
Date: Mon, 15 Feb 2016 21:38:35 +1100 [thread overview]
Message-ID: <1455532715.26205.9.camel@ellerman.id.au> (raw)
In-Reply-To: <20160212060924.GA9809@gwshan>
On Fri, 2016-02-12 at 17:09 +1100, Gavin Shan wrote:
> On Fri, Feb 12, 2016 at 05:02:46PM +1100, Andrew Donnellan wrote:
> > On 09/02/16 15:50, Gavin Shan wrote:
> > > When PCI bus is unplugged during full hotplug for EEH recovery,
> > > the platform PE instance (struct pnv_ioda_pe) isn't released and
> > > it dereferences the stale PCI bus that has been released. It leads
> > > to kernel crash when referring to the stale PCI bus.
> > >
> > > This fixes the issue by correcting the PE's primary bus when it's
> > > oneline at plugging time, in pnv_pci_dma_bus_setup() which is to
> > > be called by pcibios_fixup_bus().
> > >
> > > Reported-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> > > Reported-by: Pradipta Ghosh <pradghos@in.ibm.com>
> > > Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> > > Tested-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> >
> > I realise this has already been merged, but the following was found by
> > Coverity:
> >
> > > +void pnv_pci_dma_bus_setup(struct pci_bus *bus)
> > > +{
> > > + struct pci_controller *hose = bus->sysdata;
> > > + struct pnv_phb *phb = hose->private_data;
> > > + struct pnv_ioda_pe *pe;
> > > +
> > > + list_for_each_entry(pe, &phb->ioda.pe_list, list) {
> > > + if (!(pe->flags | (PNV_IODA_PE_BUS | PNV_IODA_PE_BUS_ALL)))
> > > + continue;
> >
> > This condition is always false. I think the first "|" is supposed to be "&".
> >
>
> Yeah, that should be "&". I think the problem isn't found when doing
> testing in non-SRIOV environment. Thanks for pointing it out.
>
> Michael, please let me know if I need send a follow-up revision to
> correct this one? I found the first two patches have been put into
> linux-next branch. I think we probably just need repost the correct
> version for this one only.
As it happens I needed to rebase my fixes branch anyway, so I've updated it and
rebased. No further action required :)
cheers
next prev parent reply other threads:[~2016-02-15 10:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 4:50 [PATCH v2 1/4] powerpc/eeh: Fix stale cached primary bus Gavin Shan
2016-02-09 4:50 ` [PATCH v2 2/4] powerpc/powernv: Fix stale PE " Gavin Shan
2016-02-12 6:02 ` Andrew Donnellan
2016-02-12 6:09 ` Gavin Shan
2016-02-15 10:38 ` Michael Ellerman [this message]
2016-02-15 22:43 ` Gavin Shan
2016-02-09 4:50 ` [PATCH v2 3/4] powerpc/eeh: Reworked eeh_pe_bus_get() Gavin Shan
2016-03-09 12:51 ` [v2,3/4] " Michael Ellerman
2016-02-09 4:50 ` [PATCH v2 4/4] powerpc/powernv: Simplify definitions of EEH debugfs handlers Gavin Shan
2016-02-17 12:41 ` [v2, " Michael Ellerman
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=1455532715.26205.9.camel@ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=andrew.donnellan@au1.ibm.com \
--cc=gwshan@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/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).