All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yijing Wang <wangyijing@huawei.com>
To: Huang Ying <ying.huang@intel.com>
Cc: Jiang Liu <liuj97@gmail.com>, Bjorn Helgaas <bhelgaas@google.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	PCI <linux-pci@vger.kernel.org>,
	Hanjun Guo <guohanjun@huawei.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [RESEND BUGFIX PATCH 1/3] PCI/AER: fix pci_ops return NULL when hotplug a pci bus which was doing aer error inject
Date: Tue, 28 Aug 2012 08:53:13 +0800	[thread overview]
Message-ID: <503C1679.4020008@huawei.com> (raw)
In-Reply-To: <1346114304.6279.341.camel@yhuang-dev>

On 2012/8/28 8:38, Huang Ying wrote:
> On Mon, 2012-08-27 at 23:05 +0800, Jiang Liu wrote:
>> Is it ok to ignore such a case? After all, aer_inject is just a test tool:)
>> It's not worth to change the core logic for such a corner case.
>> --Gerry
> 
> Why ignore?  At least you can prevent aer_inject from unload if
> something special happened.
> 

Hi Huang Ying,
   Thanks for your comments. It's my negligence. I will add some protection code when do #rmmod aer_inject(a race condition window about bus_ops),
I will correct it in the new version patch.

----------
Thanks!
Yijing


>> On 08/27/2012 09:23 AM, Huang Ying wrote:
>>> On Sat, 2012-08-25 at 17:59 +0800, Yijing Wang wrote:
>>>> When we inject aer errors to the target pci device by aer_inject module, the pci_ops of pci
>>>> bus which the target device is on will be assign to pci_ops_aer.So if the target pci device
>>>> is a bridge, once we hotplug the pci bus(child bus) which the target device bridges to, child
>>>> bus's pci_ops will be assigned to pci_ops_aer too.Now every access to the child bus's device
>>>> will result to system panic, because it return NULL pci_ops in pci_read_aer.
>>>> This patch fix this.




  reply	other threads:[~2012-08-28  0:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-11 11:52 [PATCH 1/3] PCI/AER: Fix NULL pci_ops return when hotplug a pci bus which was doing aer error inject Yijing Wang
2012-08-11 11:52 ` [PATCH 2/3] PCI/AER: Clean pci_bus_ops when related pci bus was removed Yijing Wang
2012-08-25  9:59   ` [RESEND BUGFIX PATCH 2/3] PCI/AER: clean " Yijing Wang
2012-08-11 11:52 ` [PATCH 3/3] PCI: Check whether pci device has been removed when remove a pci device by sysfs Yijing Wang
2012-08-25  9:59   ` [RESEND BUGFIX PATCH 3/3] PCI: check " Yijing Wang
2012-08-25 14:39     ` Jiang Liu
2012-08-27  6:42       ` Yijing Wang
2012-08-25  9:59 ` [RESEND BUGFIX PATCH 1/3] PCI/AER: fix pci_ops return NULL when hotplug a pci bus which was doing aer error inject Yijing Wang
2012-08-27  1:23   ` Huang Ying
2012-08-27 15:05     ` Jiang Liu
2012-08-28  0:38       ` Huang Ying
2012-08-28  0:53         ` Yijing Wang [this message]
2012-08-27  8:49   ` Chen Gong
2012-08-28  0:47     ` Yijing Wang

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=503C1679.4020008@huawei.com \
    --to=wangyijing@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=guohanjun@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liuj97@gmail.com \
    --cc=mchehab@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=ying.huang@intel.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.