• M
    PCI: Make pci_scan_slot more robust · 4fb88c1a
    Matthew Wilcox 提交于
    Yinghai pointed out that the new pci_scan_slot() crashes when called
    on an ARI-capable slot that is empty.  Fix this by exiting early from
    pci_scan_slot if there is no device in the slot.
    
    Also make next_ari_func() robust against devices not existing in case
    the ARI capability is corrupt.  ARI also requires that the devices be
    listed in order, so if we find a function listed that is out of order,
    stop scanning to prevent loops.
    Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
    Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
    4fb88c1a
probe.c 37.3 KB