lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQWM6+iGk0YNSgrvtZKjfxMbrxMYU_Qh0gAs1gLDtS8ZaQ@mail.gmail.com>
Date:	Mon, 12 Mar 2012 23:22:12 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	Jiang Liu <liuj97@...il.com>
Cc:	Jesse Barnes <jbarnes@...tuousgeek.org>, x86 <x86@...nel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 19/37] PCI: Add pci_stop_and_remove_bus()

>> +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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ