Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1717108 > unrolled thread

[Question] Race between pcie hot plug and pcie aer report?

Started byKefeng Wang <wangkefeng.wang@huawei.com>
First post2017-08-22 09:50 +0200
Last post2017-08-22 09:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [Question] Race between pcie hot plug and pcie aer report? Kefeng Wang <wangkefeng.wang@huawei.com> - 2017-08-22 09:50 +0200

#1717108 — [Question] Race between pcie hot plug and pcie aer report?

FromKefeng Wang <wangkefeng.wang@huawei.com>
Date2017-08-22 09:50 +0200
Subject[Question] Race between pcie hot plug and pcie aer report?
Message-ID<uhc6L-7GF-17@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi Bjorn and all,

   Is there some mechanism to prevent the race between pcie hot plug and pcie aer report,
I am unfamiliar with them, so correct me if I am wrong. We met a Null pointer dereference,
when inject a uncorrect error[UNCOR_STATUS RX_OVER] to a mlx , see the detail in attachment.

aer_isr
 -do_recovery
  -broadcast_error_message
   -pci_walk_bus(dev->bus, cb, &result_data); // bus  is  NULL
and there are some another issues before this error, eg,

[26924.661928] pci \xffffff90QW\xffffffb9: broadcast slot_reset message
 ...
[26926.455484]  (null): broadcast resume message


After check the log, it will also will trigger pcie hot plug when aer report is processing.

pciehp_power_thread
 - case DISABLE_REQ: pciehp_disable_slot(p_slot);
	-pciehp_unconfigure_device
	  -pci_stop_and_remove_bus_device
           -pci_stop_bus_device
            --pci_device_remove
              --remove_one[mlx5_core]
 - case ENABLE_REQ:  pciehp_enable_slot(p_slot);
         -pciehp_configure_device
          -pci_bus_add_devices
           -pci_bus_add_device
	    --pci_device_probe
             --local_pci_probe
	       --init_one[mlx5_core]


So I think the question is, the pcie hot plug will release the pcie_dev, but the aer process will use it, then
it leads to the Null pointer dereference and some other errors.

Any thought?

Thanks,
Kefeng





[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web