From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Jason Wang <jasowang@redhat.com>,
qemu-stable@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] virtio: Move memory_listener_unregister to .unrealize
Date: Tue, 16 May 2017 16:07:37 +0800 [thread overview]
Message-ID: <20170516080737.GB27669@lemon.lan> (raw)
In-Reply-To: <20170516072414.19025-1-famz@redhat.com>
On Tue, 05/16 15:24, Fam Zheng wrote:
> The root cause of the crash is not obvious here, but the change
> regardlessly makes sense so it's proposed here: the listener was
> registered in .realize(), so do the cleanup in the matching .unrealize()
> rather than the .finalize() callback.
Actually it seem calling memory_listener_unregister in .instance_finalize is not
safe because it can be in the RCU thread. This race is what caused the
corruption of the listener lists.
So I think this patch is doing the right thing.
Fam
next prev parent reply other threads:[~2017-05-16 8:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-16 7:24 [Qemu-devel] [PATCH v2] virtio: Move memory_listener_unregister to .unrealize Fam Zheng
2017-05-16 8:07 ` Fam Zheng [this message]
2017-05-16 9:23 ` Paolo Bonzini
2017-05-16 12:25 ` Fam Zheng
2017-05-16 12:44 ` Paolo Bonzini
2017-05-17 1:55 ` Fam Zheng
2017-05-17 6:58 ` Paolo Bonzini
2017-05-17 12:00 ` Fam Zheng
2017-05-17 12:52 ` Paolo Bonzini
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=20170516080737.GB27669@lemon.lan \
--to=famz@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).