This patchset fixes use-after-free bugs which show up if you put
some of the hppa pci-host devices through an "init -> deinit" lifecycle,
as the device-introspect-test does.

The problem in both cases is that we were calling pci_register_root_bus()
in instance_init: we should only call this in realize, as all the
other callers do.

These bugs show up if you run 'make check' with an ASAN enabled
build; they are also likely behind the intermittent segfaults
on s390 that RTH has noticed recently.

thanks
-- PMM

Peter Maydell (2):
  hw/pci-host/dino: Don't call pci_register_root_bus() in init
  hw/pci-host/astro: Don't call pci_regsiter_root_bus() in init

 hw/pci-host/astro.c | 27 +++++++-------
 hw/pci-host/dino.c  | 90 +++++++++++++++++++++------------------------
 2 files changed, 55 insertions(+), 62 deletions(-)

-- 
2.43.0


Reply via email to