From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, lizhijian@cn.fujitsu.com,
lvivier@redhat.com, peterx@redhat.com
Cc: quintela@redhat.com
Subject: [PULL 1/6] migration/rdma: prevent from double free the same mr
Date: Tue, 13 Jul 2021 16:23:19 +0100 [thread overview]
Message-ID: <20210713152324.217255-2-dgilbert@redhat.com> (raw)
In-Reply-To: <20210713152324.217255-1-dgilbert@redhat.com>
From: Li Zhijian <lizhijian@cn.fujitsu.com>
backtrace:
'0x00007ffff5f44ec2 in __ibv_dereg_mr_1_1 (mr=0x7fff1007d390) at /home/lizhijian/rdma-core/libibverbs/verbs.c:478
478 void *addr = mr->addr;
(gdb) bt
#0 0x00007ffff5f44ec2 in __ibv_dereg_mr_1_1 (mr=0x7fff1007d390) at /home/lizhijian/rdma-core/libibverbs/verbs.c:478
#1 0x0000555555891fcc in rdma_delete_block (block=<optimized out>, rdma=0x7fff38176010) at ../migration/rdma.c:691
#2 qemu_rdma_cleanup (rdma=0x7fff38176010) at ../migration/rdma.c:2365
#3 0x00005555558925b0 in qio_channel_rdma_close_rcu (rcu=0x555556b8b6c0) at ../migration/rdma.c:3073
#4 0x0000555555d652a3 in call_rcu_thread (opaque=opaque@entry=0x0) at ../util/rcu.c:281
#5 0x0000555555d5edf9 in qemu_thread_start (args=0x7fffe88bb4d0) at ../util/qemu-thread-posix.c:541
#6 0x00007ffff54c73f9 in start_thread () at /lib64/libpthread.so.0
#7 0x00007ffff53f3b03 in clone () at /lib64/libc.so.6 '
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Message-Id: <20210708144521.1959614-1-lizhijian@cn.fujitsu.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
migration/rdma.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/migration/rdma.c b/migration/rdma.c
index 38a099f7ee..5c2d113aa9 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -1143,6 +1143,7 @@ static int qemu_rdma_reg_whole_ram_blocks(RDMAContext *rdma)
for (i--; i >= 0; i--) {
ibv_dereg_mr(local->block[i].mr);
+ local->block[i].mr = NULL;
rdma->total_registrations--;
}
--
2.31.1
next prev parent reply other threads:[~2021-07-13 15:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 15:23 [PULL 0/6] migration queue Dr. David Alan Gilbert (git)
2021-07-13 15:23 ` Dr. David Alan Gilbert (git) [this message]
2021-07-13 15:23 ` [PULL 2/6] migration: failover: emit a warning when the card is not fully unplugged Dr. David Alan Gilbert (git)
2021-07-13 15:23 ` [PULL 3/6] migration: Release return path early for paused postcopy Dr. David Alan Gilbert (git)
2021-07-13 15:23 ` [PULL 4/6] migration: Don't do migrate cleanup if during postcopy resume Dr. David Alan Gilbert (git)
2021-07-13 15:23 ` [PULL 5/6] migration: Clear error at entry of migrate_fd_connect() Dr. David Alan Gilbert (git)
2021-07-13 15:23 ` [PULL 6/6] migration: Move bitmap_mutex out of migration_bitmap_clear_dirty() Dr. David Alan Gilbert (git)
2021-07-14 11:00 ` [PULL 0/6] migration queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210713152324.217255-2-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=lizhijian@cn.fujitsu.com \
--cc=lvivier@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).