lkml.org 
[lkml]   [2012]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 19/37] PCI: Add pci_stop_and_remove_bus()
From
>> +void pci_stop_and_remove_bus(struct pci_bus *bus)
>> +{
>> +     struct pci_host_bridge *host_bridge = NULL;
>> +     struct pci_dev *pci_bridge = NULL;
>> +
>> +     pci_stop_bus_devices(bus);
>> +
>> +     if (pci_is_root_bus(bus)) {
>> +             host_bridge = to_pci_host_bridge(bus->bridge);
>> +             pci_stop_host_bridge(host_bridge);
>> +     } else
>> +             pci_bridge = bus->self;
>> +
>> +     __pci_remove_bus_devices(bus);
>> +
>> +     pci_remove_bus(bus);
>> +
> It seems that the bus and host_bridge structures may have already been freed here,
> so should not access host_bridge structure any more.
>> +     if (host_bridge)
>> +             host_bridge->bus = NULL;
>> +

not really.

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-03-13 07:25    [from the cache]
©2003-2011 Jasper Spaans