Hi,

> +static void usb_ohci_exit(PCIDevice *dev)
> +{
> +    OHCIPCIState *ohci = PCI_OHCI(dev);
> +    OHCIState *s = &ohci->state;
> +
> +    memory_region_destroy(&s->mem);
> +
> +    if (!ohci->masterbus) {
> +        usb_bus_release(&s->bus);
> +    }
> +}

This is incomplete.  At minimum you have to care about s->eof_timer.

Same goes for the other host adapters.  There can be timers running and
there might be in-flight usb requests which must be property teared
down, to make sure we don't use-after-free hostadapter state in
callbacks.

cheers,
  Gerd



Reply via email to