• M
    PCI: Fix reference counting bug · c4ed02fa
    Matthew Wilcox 提交于
    pci_get_subsys() will decrement the reference count of the device that
    it starts searching from.  Unfortunately, the pci_find_device() interface
    will already have decremented the reference count of the device earlier,
    so the device will end up losing all reference counts and be freed.
    
    We can fix this by incrementing the reference count of the device to
    start searching from before calling pci_get_subsys().
    Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
    Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
    c4ed02fa
search.c 13.2 KB