From: Paolo Bonzini <pbonzini@redhat.com>
To: Ashijeet Acharya <ashijeetacharya@gmail.com>
Cc: John Snow <jsnow@redhat.com>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter
Date: Thu, 11 Aug 2016 12:34:13 -0400 (EDT) [thread overview]
Message-ID: <777265882.1234102.1470933253966.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <CAC2QTZas+WvfREPrP7pmps+fFzUzGimao7DSLNSPopqbBu6+KQ@mail.gmail.com>
> 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
next prev parent reply other threads:[~2016-08-11 16:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-06 17:51 [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter Ashijeet Acharya
2016-08-09 17:16 ` Ashijeet Acharya
2016-08-09 18:18 ` John Snow
2016-08-10 5:42 ` Ashijeet Acharya
2016-08-11 8:20 ` Ashijeet Acharya
2016-08-11 16:20 ` Ashijeet Acharya
2016-08-11 16:34 ` Paolo Bonzini [this message]
2016-08-11 16:40 ` Ashijeet Acharya
2016-08-11 18:45 ` [Qemu-devel] [PATCH] Fix memory leak in ide_register_restart_cb() Ashijeet Acharya
2016-08-12 9:58 ` Paolo Bonzini
2016-08-16 13:55 ` Ashijeet Acharya
2016-08-16 17:08 ` John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=777265882.1234102.1470933253966.JavaMail.zimbra@redhat.com \
--to=pbonzini@redhat.com \
--cc=ashijeetacharya@gmail.com \
--cc=jsnow@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.