Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1717108
| From | Kefeng Wang <wangkefeng.wang@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [Question] Race between pcie hot plug and pcie aer report? |
| Date | 2017-08-22 09:50 +0200 |
| Message-ID | <uhc6L-7GF-17@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
[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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[Question] Race between pcie hot plug and pcie aer report? Kefeng Wang <wangkefeng.wang@huawei.com> - 2017-08-22 09:50 +0200
csiph-web