[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/15] migration/rdma: Check qemu_rdma_init_one_block
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 10/15] migration/rdma: Check qemu_rdma_init_one_block |
Date: |
Mon, 25 Mar 2019 18:47:01 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
Actually it can't fail at the moment, but Coverity moans that
it's the only place it's not checked, and it's an easy check.
Reported-by: Coverity (CID 1399413)
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
migration/rdma.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/migration/rdma.c b/migration/rdma.c
index 63c118af09..c1bcece53b 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -641,10 +641,14 @@ static int qemu_rdma_init_one_block(RAMBlock *rb, void
*opaque)
static int qemu_rdma_init_ram_blocks(RDMAContext *rdma)
{
RDMALocalBlocks *local = &rdma->local_ram_blocks;
+ int ret;
assert(rdma->blockmap == NULL);
memset(local, 0, sizeof *local);
- foreach_not_ignored_block(qemu_rdma_init_one_block, rdma);
+ ret = foreach_not_ignored_block(qemu_rdma_init_one_block, rdma);
+ if (ret) {
+ return ret;
+ }
trace_qemu_rdma_init_ram_blocks(local->nb_blocks);
rdma->dest_blocks = g_new0(RDMADestBlock,
rdma->local_ram_blocks.nb_blocks);
--
2.20.1
- [Qemu-devel] [PULL 00/15] Migration patches, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 15/15] migration/postcopy: Update the bandwidth during postcopy, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 13/15] Migration/colo.c: Add the necessary checks for colo_do_failover, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 14/15] Migration/colo.c: Make user obtain the last COLO mode info after failover, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 09/15] migration: add support for a "tls-authz" migration parameter, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 10/15] migration/rdma: Check qemu_rdma_init_one_block,
Juan Quintela <=
- [Qemu-devel] [PULL 07/15] multifd: Add some padding, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 02/15] multifd: Rename "size" member to pages_alloc, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 12/15] Migration/colo.c: Add new COLOExitReason to handle all failover state, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 11/15] Migration/colo.c: Fix COLO failover status error, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 06/15] multifd: Change default packet size, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 08/15] multifd: Drop x-, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 05/15] multifd: Be flexible about packet size, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 03/15] multifd: Create new next_packet_size field, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 01/15] multifd: Only send pages when packet are not empty, Juan Quintela, 2019/03/25