[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/28] migration: fix incorrect memory_global_dirty_l
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 08/28] migration: fix incorrect memory_global_dirty_log_start outside BQL |
Date: |
Tue, 16 Feb 2016 17:34:26 +0100 |
This can cause various segmentation faults or aborts in qemu-iotests
test 091.
Fixes: 5b82b703b69acc67b78b98a5efc897a3912719eb
Cc: Dave Gilbert <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
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
- [Qemu-devel] [PULL 00/28] Bug fixes + NBD-over-TLS support patches for 2016-02-16, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 01/28] checkpatch: Eliminate false positive in case of comma-space-square bracket, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 02/28] checkpatch: Eliminate false positive in case of space before square bracket in a definition, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 03/28] Revert "qemu-char: Keep pty slave file descriptor open until the master is closed", Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 04/28] char: fix handling of QIO_CHANNEL_ERR_BLOCK, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 05/28] build: Don't redefine 'inline', Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 06/28] vl: change QEMU state machine for system reset, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 08/28] migration: fix incorrect memory_global_dirty_log_start outside BQL,
Paolo Bonzini <=
- [Qemu-devel] [PULL 07/28] vl: fix migration from prelaunch state, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 12/28] ipmi: sensor number should not exceed MAX_SENSORS, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 10/28] mptsas: fix memory leak, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 11/28] mptsas: fix wrong formula, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 09/28] mptsas: add missing va_end, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 14/28] qemu-nbd: add support for --object command line arg, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 16/28] nbd: convert qemu-nbd server to use I/O channels for connection setup, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 13/28] qom: add helpers for UserCreatable object types, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 15/28] nbd: convert block client to use I/O channels for connection setup, Paolo Bonzini, 2016/02/16
- [Qemu-devel] [PULL 17/28] nbd: convert blockdev NBD server to use I/O channels for connection setup, Paolo Bonzini, 2016/02/16