[PATCH 2/2] util: moving 'type' argument to avoid issues with mount() syscall.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This commit fixes a mount call inside virgroup.c file. The NULL value
into 'type' argument is causing a memory issue. See commit 794b576c2b
for more details. The best approach to fix it is moving NULL to "none"
filesytem.

Signed-off-by: Julio Faracco <jcfaracco@xxxxxxxxx>
---
 src/util/vircgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 0a31947b0d..e810a3d81d 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -3962,7 +3962,7 @@ virCgroupBindMount(virCgroupPtr group, const char *oldroot,
                 goto cleanup;
             }
 
-            if (mount(src, group->controllers[i].mountPoint, NULL, MS_BIND,
+            if (mount(src, group->controllers[i].mountPoint, "none", MS_BIND,
                       NULL) < 0) {
                 virReportSystemError(errno,
                                      _("Failed to bind cgroup '%s' on '%s'"),
-- 
2.17.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux