All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au
Subject: Re: [PATCH v2 2/4] powerpc/powernv: Fix stale PE primary bus
Date: Fri, 12 Feb 2016 17:09:24 +1100	[thread overview]
Message-ID: <20160212060924.GA9809@gwshan> (raw)
In-Reply-To: <56BD7586.7060803@au1.ibm.com>

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.

Thanks,
Gavin

>-- 
>Andrew Donnellan              Software Engineer, OzLabs
>andrew.donnellan@au1.ibm.com  Australia Development Lab, Canberra
>+61 2 6201 8874 (work)        IBM Australia Limited

  reply	other threads:[~2016-02-12  6:10 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 [this message]
2016-02-15 10:38       ` Michael Ellerman
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=20160212060924.GA9809@gwshan \
    --to=gwshan@linux.vnet.ibm.com \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.