From 2f332438f939b4c464609a4abb1c5d75aabf66ca Mon Sep 17 00:00:00 2001 From: "Danilo C. L. de Paula" Date: Mon, 28 Jan 2019 14:41:10 +0000 Subject: [PATCH] * Mon Jan 28 2019 Danilo Cesar Lemes de Paula - 3.1.0-8.el8 - kvm-migration-rdma-unregister-fd-handler.patch [bz#1666601] - Resolves: bz#1666601 ([q35] dst qemu core dumped when do rdma migration with Mellanox IB QDR card) --- ...migration-rdma-unregister-fd-handler.patch | 53 +++++++++++++++++++ qemu-kvm.spec | 9 +++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 kvm-migration-rdma-unregister-fd-handler.patch diff --git a/kvm-migration-rdma-unregister-fd-handler.patch b/kvm-migration-rdma-unregister-fd-handler.patch new file mode 100644 index 0000000..f76b244 --- /dev/null +++ b/kvm-migration-rdma-unregister-fd-handler.patch @@ -0,0 +1,53 @@ +From 7e65f4bfb4737b32ace64a5b53fa8915a7d28565 Mon Sep 17 00:00:00 2001 +From: "Dr. David Alan Gilbert" +Date: Thu, 24 Jan 2019 16:41:10 +0000 +Subject: [PATCH] migration/rdma: unregister fd handler +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +RH-Author: Dr. David Alan Gilbert +Message-id: <20190124164110.18787-2-dgilbert@redhat.com> +Patchwork-id: 84110 +O-Subject: [RHEL-8.0 qemu-kvm PATCH 1/1] migration/rdma: unregister fd handler +Bugzilla: 1666601 +RH-Acked-by: Peter Xu +RH-Acked-by: Pankaj Gupta +RH-Acked-by: Philippe Mathieu-Daudé + +From: "Dr. David Alan Gilbert" + +Unregister the fd handler before we destroy the channel, +otherwise we've got a race where we might land in the +fd handler just as we're closing the device. + +(The race is quite data dependent, you just have to have +the right set of devices for it to trigger). + +Corresponds to RH bz: https://bugzilla.redhat.com/show_bug.cgi?id=1666601 + +Signed-off-by: Dr. David Alan Gilbert +Message-Id: <20190122173111.29821-1-dgilbert@redhat.com> +Reviewed-by: Peter Xu +Signed-off-by: Dr. David Alan Gilbert +(cherry picked from commit fbbaacab2758cb3f32a07524710533b1d6422be4) +Signed-off-by: Danilo C. L. de Paula +--- + migration/rdma.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/migration/rdma.c b/migration/rdma.c +index 9b2e7e1..54a3c11 100644 +--- a/migration/rdma.c ++++ b/migration/rdma.c +@@ -2321,6 +2321,7 @@ static void qemu_rdma_cleanup(RDMAContext *rdma) + rdma->connected = false; + } + ++ qemu_set_fd_handler(rdma->channel->fd, NULL, NULL, NULL); + g_free(rdma->dest_blocks); + rdma->dest_blocks = NULL; + +-- +1.8.3.1 + diff --git a/qemu-kvm.spec b/qemu-kvm.spec index e722aaa..2537dd3 100644 --- a/qemu-kvm.spec +++ b/qemu-kvm.spec @@ -68,7 +68,7 @@ Obsoletes: %1-rhev Summary: QEMU is a machine emulator and virtualizer Name: qemu-kvm Version: 3.1.0 -Release: 7%{?dist} +Release: 8%{?dist} # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped Epoch: 15 License: GPLv2 and GPLv2+ and CC-BY @@ -162,6 +162,8 @@ Patch38: kvm-cpus-ignore-ESRCH-in-qemu_cpu_kick_thread.patch Patch39: kvm-i386-kvm-expose-HV_CPUID_ENLIGHTMENT_INFO.EAX-and-HV.patch # For bz#1653511 - qemu doesn't report all support cpu features which cause libvirt cannot get the support status of hv_tlbflush Patch40: kvm-i386-kvm-add-a-comment-explaining-why-.feat_names-ar.patch +# For bz#1666601 - [q35] dst qemu core dumped when do rdma migration with Mellanox IB QDR card +Patch41: kvm-migration-rdma-unregister-fd-handler.patch BuildRequires: zlib-devel BuildRequires: glib2-devel @@ -1009,6 +1011,11 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Mon Jan 28 2019 Danilo Cesar Lemes de Paula - 3.1.0-8.el8 +- kvm-migration-rdma-unregister-fd-handler.patch [bz#1666601] +- Resolves: bz#1666601 + ([q35] dst qemu core dumped when do rdma migration with Mellanox IB QDR card) + * Thu Jan 24 2019 Danilo Cesar Lemes de Paula - 3.1.0-7.el8 - kvm-i386-kvm-expose-HV_CPUID_ENLIGHTMENT_INFO.EAX-and-HV.patch [bz#1653511] - kvm-i386-kvm-add-a-comment-explaining-why-.feat_names-ar.patch [bz#1653511]