qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci


From: Paolo Bonzini
Subject: Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter
Date: Thu, 11 Aug 2016 12:34:13 -0400 (EDT)

> I think we should do
> 
> s->vmstate = qemu_add_vm_change_state_handler(ide_restart_cb, bus);
> instead of
> qemu_add_vm_change_state_handler(ide_restart_cb, bus);
> 
> in ide_register_restart_cb() in hw/ide/core.c to store the returned
> pointer to memory to avoid a possible memory leak I guess and
> introduce a VMChangeStateEntry field in struct AHCIState to handle
> this. Same can then further be used with
> qemu_del_vm_change_state_handler() in ahci_unrealize() to free things
> up.

Yes, this is correct. Thanks!

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]