From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1203F15808B for ; Tue, 8 Mar 2022 13:18:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 55EB0E0814; Tue, 8 Mar 2022 13:18:17 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EF5BAE0822 for ; Tue, 8 Mar 2022 13:18:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0447034317E for ; Tue, 8 Mar 2022 13:18:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9834930F for ; Tue, 8 Mar 2022 13:18:12 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1646745472.96cb0babf037056c1e09ab5decbb4f60a448bc21.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/, app-emulation/libvirt/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/libvirt/files/libvirt-8.1.0-libxl-Fix-libvirtd-crash-on-domain-restore.patch app-emulation/libvirt/libvirt-8.0.0-r1.ebuild app-emulation/libvirt/libvirt-8.0.0-r2.ebuild X-VCS-Directories: app-emulation/libvirt/ app-emulation/libvirt/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 96cb0babf037056c1e09ab5decbb4f60a448bc21 X-VCS-Branch: master Date: Tue, 8 Mar 2022 13:18:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 13a60e59-74ac-4e68-a420-0dbdad19c282 X-Archives-Hash: ae08d25eaf0f14bc3c42d74d5975739f commit: 96cb0babf037056c1e09ab5decbb4f60a448bc21 Author: Michal Privoznik redhat com> AuthorDate: Tue Mar 8 09:11:30 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Mar 8 13:17:52 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96cb0bab app-emulation/libvirt: Fix libvirtd crash on domain restore In the libvirt-8.0.0 development cycle a commit was merged that can potentially cause crash of libvirtd. This was fixed in the next release. Backport the commit that fixes the problem. Closes: https://bugs.gentoo.org/831447 Signed-off-by: Michal Privoznik redhat.com> Closes: https://github.com/gentoo/gentoo/pull/24448 Signed-off-by: Sam James gentoo.org> ...ibxl-Fix-libvirtd-crash-on-domain-restore.patch | 37 ++++++++++++++++++++++ ...irt-8.0.0-r1.ebuild => libvirt-8.0.0-r2.ebuild} | 1 + 2 files changed, 38 insertions(+) diff --git a/app-emulation/libvirt/files/libvirt-8.1.0-libxl-Fix-libvirtd-crash-on-domain-restore.patch b/app-emulation/libvirt/files/libvirt-8.1.0-libxl-Fix-libvirtd-crash-on-domain-restore.patch new file mode 100644 index 000000000000..f6116aa535d2 --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-8.1.0-libxl-Fix-libvirtd-crash-on-domain-restore.patch @@ -0,0 +1,37 @@ +From 454b927d1e33a1fe9dca535db2c97300fdae62cc Mon Sep 17 00:00:00 2001 +Message-Id: <454b927d1e33a1fe9dca535db2c97300fdae62cc.1646730306.git.mprivozn@redhat.com> +From: Jim Fehlig +Date: Thu, 17 Feb 2022 11:48:13 -0700 +Subject: [PATCH] libxl: Fix libvirtd crash on domain restore +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Commit cc2a3c2a94 missed one case in the libxl driver where virDomainDef +is returned from libxlDomainSaveImageOpen and a g_steal_pointer is needed. +Without it, the virDomainDef object is freed and the driver crashes later +in the restore process when accessing the object. + +Signed-off-by: Jim Fehlig +Reviewed-by: Ján Tomko +Signed-off-by: Michal Privoznik +--- + src/libxl/libxl_domain.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c +index c91e531a9a..ee031267ca 100644 +--- a/src/libxl/libxl_domain.c ++++ b/src/libxl/libxl_domain.c +@@ -811,7 +811,7 @@ libxlDomainSaveImageOpen(libxlDriverPrivate *driver, + VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE))) + goto error; + +- *ret_def = def; ++ *ret_def = g_steal_pointer(&def); + *ret_hdr = hdr; + + return fd; +-- +2.34.1 + diff --git a/app-emulation/libvirt/libvirt-8.0.0-r1.ebuild b/app-emulation/libvirt/libvirt-8.0.0-r2.ebuild similarity index 99% rename from app-emulation/libvirt/libvirt-8.0.0-r1.ebuild rename to app-emulation/libvirt/libvirt-8.0.0-r2.ebuild index 65a40aeebebc..e6ed2c625c40 100644 --- a/app-emulation/libvirt/libvirt-8.0.0-r1.ebuild +++ b/app-emulation/libvirt/libvirt-8.0.0-r2.ebuild @@ -135,6 +135,7 @@ PATCHES=( "${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch "${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch "${FILESDIR}"/${PN}-8.1.0-docs-Fix-template-matching-in-page.xsl.patch + "${FILESDIR}"/${PN}-8.1.0-libxl-Fix-libvirtd-crash-on-domain-restore.patch ) pkg_setup() {