29 lines
1.1 KiB
Diff
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__) */
|
||
|
|