]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: moving 'type' argument to avoid issues with mount() syscall.
authorJulio Faracco <jcfaracco@gmail.com>
Wed, 27 Jun 2018 15:06:26 +0000 (12:06 -0300)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 3 Jul 2018 02:56:29 +0000 (04:56 +0200)
This commit fixes a mount call inside virgroup.c file. The NULL value
into 'type' argument is causing a valgrind issue. See commit 794b576c
for more details. The best approach to fix it is moving NULL to "none"
filesytem.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
src/util/vircgroup.c

index 0a31947b0d5412742570104369c2a86e25781a39..e810a3d81d79faa4599206bb86bbc172b90f53a9 100644 (file)
@@ -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'"),