[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 04/24] qmp: forbid qmp_cont in RUN_STATE_FINISH_MIGRA
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 04/24] qmp: forbid qmp_cont in RUN_STATE_FINISH_MIGRATE |
Date: |
Mon, 20 May 2019 18:14:33 +0200 |
From: Vladimir Sementsov-Ogievskiy <address@hidden>
qmp_cont in RUN_STATE_FINISH_MIGRATE may lead to moving vm to
RUN_STATE_RUNNING, before actual migration finish. So, when migration
thread will try to go to RUN_STATE_POSTMIGRATE, assuming transition
RUN_STATE_FINISH_MIGRATE->RUN_STATE_POSTMIGRATE, it will crash, as
current state is RUN_STATE_RUNNING, and transition
RUN_STATE_RUNNING->RUN_STATE_POSTMIGRATE is forbidden.
Reported-by: Max Reitz <address@hidden>
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
qmp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/qmp.c b/qmp.c
index b92d62cd5f..fa1b3c1577 100644
--- a/qmp.c
+++ b/qmp.c
@@ -156,6 +156,9 @@ void qmp_cont(Error **errp)
return;
} else if (runstate_check(RUN_STATE_SUSPENDED)) {
return;
+ } else if (runstate_check(RUN_STATE_FINISH_MIGRATE)) {
+ error_setg(errp, "Migration is not finalized yet");
+ return;
}
for (blk = blk_next(NULL); blk; blk = blk_next(blk)) {
--
2.20.1
- [Qemu-block] [PULL 00/24] Block layer patches, Kevin Wolf, 2019/05/20
- [Qemu-block] [PULL 06/24] nvme: fix copy direction in DMA reads going to CMB, Kevin Wolf, 2019/05/20
- [Qemu-block] [PULL 04/24] qmp: forbid qmp_cont in RUN_STATE_FINISH_MIGRATE,
Kevin Wolf <=
- [Qemu-block] [PULL 03/24] block: Use BDRV_REQUEST_MAX_BYTES instead of BDRV_REQUEST_MAX_SECTORS, Kevin Wolf, 2019/05/20
- [Qemu-block] [PULL 01/24] block/file-posix: Truncate in xfs_write_zeroes(), Kevin Wolf, 2019/05/20
- [Qemu-block] [PULL 02/24] qcow2: Define and use QCOW2_COMPRESSED_SECTOR_SIZE, Kevin Wolf, 2019/05/20
- [Qemu-block] [PULL 09/24] block: Move recursion to bdrv_set_aio_context(), Kevin Wolf, 2019/05/20
- [Qemu-block] [PULL 12/24] block: Implement .(can_)set_aio_ctx for BlockBackend, Kevin Wolf, 2019/05/20
- [Qemu-block] [PULL 07/24] block: Add bdrv_try_set_aio_context(), Kevin Wolf, 2019/05/20
- [Qemu-block] [PULL 05/24] iotest: fix 169: do not run qmp_cont in RUN_STATE_FINISH_MIGRATE, Kevin Wolf, 2019/05/20
- [Qemu-block] [PULL 10/24] block: Propagate AioContext change to parents, Kevin Wolf, 2019/05/20
- [Qemu-block] [PULL 11/24] test-block-iothread: Test AioContext propagation through the tree, Kevin Wolf, 2019/05/20
- [Qemu-block] [PULL 16/24] test-block-iothread: Test AioContext propagation for block jobs, Kevin Wolf, 2019/05/20