* [Qemu-devel] [PATCH] migration: fix incorrect memory_global_dirty_log_start outside BQL
@ 2016-02-15 19:00 Paolo Bonzini
2016-02-16 12:49 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2016-02-15 19:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Dave Gilbert, Stefan Hajnoczi
This can cause various segmentation faults or aborts in qemu-iotests
test 091.
Fixes: 5b82b703b69acc67b78b98a5efc897a3912719eb
Cc: Dave Gilbert <dgilbert@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
migration/ram.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/migration/ram.c b/migration/ram.c
index 96c749f..704f6a9 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1920,6 +1920,9 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
acct_clear();
}
+ /* For memory_global_dirty_log_start below. */
+ qemu_mutex_lock_iothread();
+
qemu_mutex_lock_ramlist();
rcu_read_lock();
bytes_transferred = 0;
@@ -1944,6 +1947,7 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
memory_global_dirty_log_start();
migration_bitmap_sync();
qemu_mutex_unlock_ramlist();
+ qemu_mutex_unlock_iothread();
qemu_put_be64(f, ram_bytes_total() | RAM_SAVE_FLAG_MEM_SIZE);
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: fix incorrect memory_global_dirty_log_start outside BQL
2016-02-15 19:00 [Qemu-devel] [PATCH] migration: fix incorrect memory_global_dirty_log_start outside BQL Paolo Bonzini
@ 2016-02-16 12:49 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2016-02-16 12:49 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, Dave Gilbert
[-- Attachment #1: Type: text/plain, Size: 471 bytes --]
On Mon, Feb 15, 2016 at 08:00:23PM +0100, Paolo Bonzini wrote:
> This can cause various segmentation faults or aborts in qemu-iotests
> test 091.
>
> Fixes: 5b82b703b69acc67b78b98a5efc897a3912719eb
> Cc: Dave Gilbert <dgilbert@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> migration/ram.c | 4 ++++
> 1 file changed, 4 insertions(+)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-16 12:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15 19:00 [Qemu-devel] [PATCH] migration: fix incorrect memory_global_dirty_log_start outside BQL Paolo Bonzini
2016-02-16 12:49 ` Stefan Hajnoczi
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).