Fix build with glib2 2.75.3 (RHBZ#2173639)

This commit is contained in:
Richard W.M. Jones 2023-02-27 16:09:52 +00:00
parent fb1517ca3f
commit d8ea841ee8
7 changed files with 54 additions and 5 deletions

View File

@ -1,7 +1,7 @@
From e54512fe75f85640c0c73e53e6f8bd0b9d193529 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Tue, 1 Feb 2022 20:09:37 +0100
Subject: [PATCH 1/5] target/i386: the sgx_epc_get_section stub is reachable
Subject: [PATCH 1/6] target/i386: the sgx_epc_get_section stub is reachable
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From 2f0a0afbf915d36c39c5cfac1e31c6edc7f47bef Mon Sep 17 00:00:00 2001
From: "Eduardo Lima (Etrunko)" <etrunko@redhat.com>
Date: Thu, 1 Sep 2022 12:43:49 -0300
Subject: [PATCH 2/5] tests: Disable pci_virtio_vga for ppc64
Subject: [PATCH 2/6] tests: Disable pci_virtio_vga for ppc64
starting QEMU: exec ./qemu-system-ppc64 -qtest unix:/tmp/qtest-2378197.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2378197.qmp,id=char0 -mon chardev=char0,mode=control -display none -vga none -device virtio-vga -accel qtest
stderr:

View File

@ -1,7 +1,7 @@
From 5c1d2f920c14d6e8f4ac7abc62714eadaa60f228 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Tue, 10 Jan 2023 12:37:14 -0500
Subject: [PATCH 3/5] Revert "linux-user: add more compat ioctl definitions"
Subject: [PATCH 3/6] Revert "linux-user: add more compat ioctl definitions"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From b40cf0a490c28d5b79e05382d061983b92a7b2b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Tue, 10 Jan 2023 12:37:25 -0500
Subject: [PATCH 4/5] Revert "linux-user: fix compat with glibc >= 2.36
Subject: [PATCH 4/6] Revert "linux-user: fix compat with glibc >= 2.36
sys/mount.h"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8

View File

@ -1,7 +1,7 @@
From db788c896eb1378ebc1f20dcc4954616a7631919 Mon Sep 17 00:00:00 2001
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Tue, 7 Feb 2023 15:37:16 -0500
Subject: [PATCH 5/5] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF
Subject: [PATCH 5/6] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF
When a write request is converted into a write zeroes request by the
detect-zeroes= feature, it is no longer associated with an I/O buffer.

View File

@ -0,0 +1,43 @@
From 930def8769940600dd7dd587ec2accd4a8b6e1f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Date: Mon, 27 Feb 2023 16:02:51 +0000
Subject: [PATCH 6/6] [PATCH] test-vmstate: fix bad GTree usage, use-after-free
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
According to g_tree_foreach() documentation:
"The tree may not be modified while iterating over it (you can't
add/remove items)."
Fixes: 9a85e4b8f6 ("migration: Support gtree migration")
Cc: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
tests/unit/test-vmstate.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/unit/test-vmstate.c b/tests/unit/test-vmstate.c
index 541bb4f63e..36b253eb67 100644
--- a/tests/unit/test-vmstate.c
+++ b/tests/unit/test-vmstate.c
@@ -1074,7 +1074,6 @@ static gboolean diff_tree(gpointer key, gpointer value, gpointer data)
struct match_node_data d = {tp->tree2, key, value};
g_tree_foreach(tp->tree2, tp->match_node, &d);
- g_tree_remove(tp->tree1, key);
return false;
}
@@ -1084,7 +1083,7 @@ static void compare_trees(GTree *tree1, GTree *tree2,
struct tree_cmp_data tp = {tree1, tree2, function};
g_tree_foreach(tree1, diff_tree, &tp);
- assert(g_tree_nnodes(tree1) == 0);
+ g_tree_destroy(g_tree_ref(tree1));
assert(g_tree_nnodes(tree2) == 0);
}
--
2.37.3

View File

@ -352,6 +352,11 @@ Patch: 0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch
Patch: 0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch
# Fix virtio-blk-pci detect-zeroes=unmap (RHBZ#2173357)
Patch: 0005-block-fix-detect-zeroes-with-BDRV_REQ_REGISTERED_BUF.patch
# Fix build with glib2 2.75.3
# https://bugzilla.redhat.com/show_bug.cgi?id=2173639
# https://gitlab.com/qemu-project/qemu/-/issues/1518
# Patch is NOT UPSTREAM.
Patch: 0006-PATCH-test-vmstate-fix-bad-GTree-usage-use-after-fre.patch
BuildRequires: meson >= %{meson_version}
BuildRequires: zlib-devel
@ -2783,6 +2788,7 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
%changelog
* Mon Feb 27 2023 Richard W.M. Jones <rjones@redhat.com> - 7.2.0-7
- Fix virtio-blk-pci detect-zeroes=unmap (RHBZ#2173357)
- Fix build with glib2 2.75.3 (RHBZ#2173639)
* Tue Jan 31 2023 Stefan Hajnoczi <stefanha@redhat.com> - 7.2.0-6
- Enable libblkio