All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dongdong Liu <liudongdong3@huawei.com>
To: Sinan Kaya <okaya@kernel.org>, Keith Busch <keith.busch@intel.com>
Cc: "helgaas@kernel.org" <helgaas@kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linuxarm@huawei.com" <linuxarm@huawei.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	tanxiaofei <tanxiaofei@huawei.com>
Subject: Re: [PATCH] PCI/ERR: Fix run error recovery callbacks for all affected devices
Date: Mon, 28 Jan 2019 22:05:21 +0800	[thread overview]
Message-ID: <2871dbbe-fb99-ef33-3787-79a96b274b50@huawei.com> (raw)
In-Reply-To: <7b515af9-b119-bf33-f774-3e091ca30483@kernel.org>

Hi Sinan
在 2019/1/26 1:09, Sinan Kaya 写道:
> On 1/25/2019 9:28 AM, Dongdong Liu wrote:
>> I want to fix 2 points by the patch.
>>
>> 1. For EP devices (such as multi-function EP device) under the same bus,
>> when one of the EP devices met non-fatal error, should report non-fatal
>> error only to the error endpoint device, no need to broadcast all of them.
>> That is the patch (PCI/AER: Report non-fatal errors only to the affected endpoint  #4.15)
>> have done, but current code PATCH [1] broken this.
>>
>> 2. We found a NULL pointer dereference issue for 74:02.0 device
>> when the device met a non-fatal error (firmware-first) after 4.19.
>> The topology is as below.
>
> Is it possible to split the patches into two to address these two different
> issues?

Good suggestion, will do.

>
> I can understand the first one but second one seems some mystery that needs
> to be explored in detail.
>

  +-[0000:74]-+-02.0  Huawei Technologies Co., Ltd. HiSilicon SAS 3.0 HBA
  |           \-03.0  Huawei Technologies Co., Ltd. HiSilicon AHCI HBA

74:02.0 is a RCiEP, but do not under a root port.
Current code have the issue as the below code, see [DD].
aer_recover_work_func()
     pcie_do_recovery() {

	/*
	 * Error recovery runs on all subordinates of the first downstream port.
	 * If the downstream port detected the error, it is cleared at the end.
	 */
	if (!(pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT ||
	      pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM))
		dev = dev->bus->self;   //[DD]: Here dev will be NULL pointer for 74:02.0(RCiEP)as it does not have a root port.
	bus = dev->subordinate;
  }

We do not have the  NULL pointer dereference issue
before the patch [1] PCI/ERR: Run error recovery callbacks for all affected devices   #4.20 .

Thanks,
Dongdong
> .
>


  reply	other threads:[~2019-01-28 14:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-24 13:50 [PATCH] PCI/ERR: Fix run error recovery callbacks for all affected devices Dongdong Liu
2019-01-24 18:18 ` Sinan Kaya
2019-01-24 21:37   ` Keith Busch
2019-01-25 14:28     ` Dongdong Liu
2019-01-25 17:09       ` Sinan Kaya
2019-01-28 14:05         ` Dongdong Liu [this message]
2019-01-25 17:17       ` Keith Busch
2019-01-25 17:37         ` Sinan Kaya
2019-01-25 17:46           ` Keith Busch
2019-01-25 17:46           ` Sinan Kaya
2019-01-28 14:54             ` Dongdong Liu
2019-01-28 15:47               ` Sinan Kaya
2019-01-28 16:15                 ` Sinan Kaya

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=2871dbbe-fb99-ef33-3787-79a96b274b50@huawei.com \
    --to=liudongdong3@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=keith.busch@intel.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=okaya@kernel.org \
    --cc=tanxiaofei@huawei.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 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.