c480ed
From bb4d2abe30f8ad3de4f7f3201de897440cdd545c Mon Sep 17 00:00:00 2001
c480ed
Message-Id: <bb4d2abe30f8ad3de4f7f3201de897440cdd545c@dist-git>
c480ed
From: Julio Faracco <jcfaracco@gmail.com>
c480ed
Date: Mon, 1 Jul 2019 17:05:46 +0200
c480ed
Subject: [PATCH] util: moving 'type' argument to avoid issues with mount()
c480ed
 syscall.
c480ed
MIME-Version: 1.0
c480ed
Content-Type: text/plain; charset=UTF-8
c480ed
Content-Transfer-Encoding: 8bit
c480ed
c480ed
This commit fixes a mount call inside virgroup.c file. The NULL value
c480ed
into 'type' argument is causing a valgrind issue. See commit 794b576c
c480ed
for more details. The best approach to fix it is moving NULL to "none"
c480ed
filesytem.
c480ed
c480ed
Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
c480ed
(cherry picked from commit 4539301bc84ee65558a48c1c3c22aa04f458dbe0)
c480ed
c480ed
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297
c480ed
c480ed
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
c480ed
Message-Id: <006a95f4385f575718eee431fc905702cff3e848.1561993099.git.phrdina@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
---
c480ed
 src/util/vircgroup.c | 2 +-
c480ed
 1 file changed, 1 insertion(+), 1 deletion(-)
c480ed
c480ed
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
c480ed
index 0a31947b0d..e810a3d81d 100644
c480ed
--- a/src/util/vircgroup.c
c480ed
+++ b/src/util/vircgroup.c
c480ed
@@ -3962,7 +3962,7 @@ virCgroupBindMount(virCgroupPtr group, const char *oldroot,
c480ed
                 goto cleanup;
c480ed
             }
c480ed
 
c480ed
-            if (mount(src, group->controllers[i].mountPoint, NULL, MS_BIND,
c480ed
+            if (mount(src, group->controllers[i].mountPoint, "none", MS_BIND,
c480ed
                       NULL) < 0) {
c480ed
                 virReportSystemError(errno,
c480ed
                                      _("Failed to bind cgroup '%s' on '%s'"),
c480ed
-- 
c480ed
2.22.0
c480ed