- vdpa: support vdpa device migrate - vdpa: support vdpa device hot plug/unplug - vdpa: Introduce the new device type vdpa to hostdev - node_device: fix leak of DIR* - Include vdpa devices in node device list - lxc: fix lxcContainerMountAllFS() DEREF_BEFORE_CHECK - qemu: Return perf status that affect next boot for shutoff domains While we set up perf events for a shutoff domain and check the settings, All of perf events are reported as 'disabled', unless we add --config, This is redundant for a shutoff domain. - tests: upstream Fixing compiler warning in cputest - qemu_migration_cookie: Rename ret in qemuDomainExtractTLSSubject - virrandom: Fix printf format string in virRandomGenerateWWN() - fix the issue of errors when saving after 'virsh edit' - Use (un)signed printf specifiers correctly - admin: fix leak of typed parameters on error - esx: call freeaddrinfo earlier in esxUtil_ResolveHostname Call freeaddrinfo() as soon as @result is not needed anymore, i.e. right after getnameinfo(); this avoids calling freeaddrinfo() in two branches. - qemu: Fix incorrect command name in error messages Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
From 24994ec0adb7385e56b740f85a1bc0ed0a8002cd Mon Sep 17 00:00:00 2001
|
|
From: Dmitry Frolov <frolov@swemel.ru>
|
|
Date: Thu, 7 Sep 2023 12:04:57 +0300
|
|
Subject: [PATCH] lxc: fix lxcContainerMountAllFS() DEREF_BEFORE_CHECK
|
|
|
|
vmDef->fss[i]->src->path may be NULL,
|
|
so check is needed before passing it to VIR_DEBUG.
|
|
Also removed checking vmDef->fss[i]->src for NULL, since it may not be NULL.
|
|
|
|
Fixes: 57487085dc ("lxc: don't try to reference NULL when mounting filesystems")
|
|
|
|
Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
|
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
|
Signed-off-by: zhujun2 <zhujun2_yewu@cmss.chinamobile.com>
|
|
---
|
|
src/lxc/lxc_container.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
|
|
index 1c28ecfdb7..4736c14cb7 100644
|
|
--- a/src/lxc/lxc_container.c
|
|
+++ b/src/lxc/lxc_container.c
|
|
@@ -1579,12 +1579,13 @@ static int lxcContainerMountAllFS(virDomainDefPtr vmDef,
|
|
if (STREQ(vmDef->fss[i]->dst, "/"))
|
|
continue;
|
|
|
|
- VIR_DEBUG("Mounting '%s' -> '%s'", vmDef->fss[i]->src->path, vmDef->fss[i]->dst);
|
|
+ VIR_DEBUG("Mounting '%s' -> '%s'", NULLSTR(vmDef->fss[i]->src->path),
|
|
+ vmDef->fss[i]->dst);
|
|
|
|
if (lxcContainerResolveSymlinks(vmDef->fss[i], false) < 0)
|
|
return -1;
|
|
|
|
- if (!(vmDef->fss[i]->src && vmDef->fss[i]->src->path &&
|
|
+ if (!(vmDef->fss[i]->src->path &&
|
|
STRPREFIX(vmDef->fss[i]->src->path, vmDef->fss[i]->dst)) &&
|
|
lxcContainerUnmountSubtree(vmDef->fss[i]->dst, false) < 0)
|
|
return -1;
|
|
--
|
|
2.27.0
|
|
|