libvirt/c3f16cea-qemu-cleanup-label-on-umount-failure.patch
James Fehlig 99745c22a8 - qemu: Fix umount of /dev in VM private namespace
c3f16cea-qemu-cleanup-label-on-umount-failure.patch,
  697c16e3-qemu_process-better-debug-message.patch,
  5155ab4b-qemu_namespace-nested-mounts-when-umount.patch
  boo#1207889

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=966
2023-02-08 18:06:01 +00:00

29 lines
1.1 KiB
Diff

From aa144c00c1b8f1deee6f80f8de076d5bfac72811 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Mon, 6 Feb 2023 10:40:12 -0700
Subject: [PATCH 1/3] qemu: Jump to cleanup label on umount failure
Similar to other error paths in qemuDomainUnshareNamespace(), jump to
the cleanup label on umount error instead of directly returning -1.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit c3f16cea3bef578c498c720aa90c677ee9511e2f)
---
src/qemu/qemu_namespace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: libvirt-9.0.0/src/qemu/qemu_namespace.c
===================================================================
--- libvirt-9.0.0.orig/src/qemu/qemu_namespace.c
+++ libvirt-9.0.0/src/qemu/qemu_namespace.c
@@ -779,7 +779,7 @@ qemuDomainUnshareNamespace(virQEMUDriver
#if defined(__linux__)
if (umount("/dev") < 0) {
virReportSystemError(errno, "%s", _("failed to umount devfs on /dev"));
- return -1;
+ goto cleanup;
}
#endif /* !defined(__linux__) */