* [Qemu-devel] [PATCH] migration/rdma: Check qemu_rdma_init_one_block
@ 2019-03-08 18:51 Dr. David Alan Gilbert (git)
2019-03-11 3:14 ` Peter Xu
0 siblings, 1 reply; 2+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2019-03-08 18:51 UTC (permalink / raw)
To: qemu-devel, quintela, peterx, peter.maydell
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
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 <dgilbert@redhat.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] migration/rdma: Check qemu_rdma_init_one_block
2019-03-08 18:51 [Qemu-devel] [PATCH] migration/rdma: Check qemu_rdma_init_one_block Dr. David Alan Gilbert (git)
@ 2019-03-11 3:14 ` Peter Xu
0 siblings, 0 replies; 2+ messages in thread
From: Peter Xu @ 2019-03-11 3:14 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git); +Cc: qemu-devel, quintela, peter.maydell
On Fri, Mar 08, 2019 at 06:51:24PM +0000, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> 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 <dgilbert@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-11 3:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-08 18:51 [Qemu-devel] [PATCH] migration/rdma: Check qemu_rdma_init_one_block Dr. David Alan Gilbert (git)
2019-03-11 3:14 ` Peter Xu
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).