[PATCH] NEWS: Mention stuff I've dealt with for this release
by Michal Privoznik
Crème de la crème of my work for this release.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
NEWS.rst | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index cecdcc72a0..24e002b3d2 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -59,6 +59,11 @@ v7.3.0 (unreleased)
since we know that it won't depend on any backing image and thus can prevent
attempts to probe the backing chain.
+ * qemu: Expose disk serial in virDomainGetGuestInfo()
+
+ The ``virDomainGetGuestInfo()`` reports disk serial number among with other
+ disk information.
+
* **Bug fixes**
* qemu: Fix crash of libvirt on full block pull of a disk
@@ -88,6 +93,20 @@ v7.3.0 (unreleased)
job, libvirt would get confused and execute the code as if the job were
aborted.
+ * lxc: Fix container destroy with CGroupsV2
+
+ When an LXC container was started and the host used CGroupsV2 it might have
+ had created nested controllers under the container's scope. Libvirt was
+ unaware and thus destroying the container failed with a cryptic error:
+ ``failed to get cgroup backend for 'pathOfController'``. The CGroup removal
+ code was reworked and is now capable of dealing with such scenario.
+
+ * bash-completion: Fix argument passing to $1
+
+ Due to a bug in bash completion script, the auto completion did not work
+ properly when a connection URI or read only flag were specified on
+ ``virsh`` or ``virt-admin`` command line.
+
v7.2.0 (2021-04-01)
===================
--
2.26.3
3 years, 6 months
[PATCH] NEWS: Mention notable changes
by Peter Krempa
Add entries for deprecation_behavior, improving of errors from virsh's
snapshot helpers and other bugfixes.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
NEWS.rst | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 5f8b0ae02d..4a5e2c9fd4 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -18,10 +18,58 @@ v7.3.0 (unreleased)
The xen driver now supports domains with more than 4TB of memory with
xen >= 4.13.
+ * qemu: Allow use of qemu's ``-compat`` option
+
+ Curious developers or testers now can enable certain ``-compat`` modes which
+ allow to notice use of deprecated commands and options as qemu will use the
+ selected method to notify the user. The new behaviour can be requested using
+ either the ``deprecation_behavior`` option in ``qemu.conf`` for all VMs or
+ using ``<qemu:deprecation behavior='...'/>`` in the VM XML.
+
* **Improvements**
+ * virsh: Improve errors with ``virsh snapshot-create-as``
+
+ The XML constructed by virsh was forced through RNG schema validation which
+ yielded unintelligible error messages in cases such as when the path to
+ the new image was not starting with a slash. XMLs are no longer validated
+ as the XML parser actually has better error messages which allow users to
+ figure the problem out quickly.
+
+ * qemu: Terminate backing store when doing a full-chain block pull
+
+ When pulling everything into the overlay image the chain can be terminated
+ since we know that it won't depend on any backing image and thus can prevent
+ attempts to probe the backing chain.
+
* **Bug fixes**
+ * qemu: Fix crash of libvirt on full block pull of a disk
+
+ When the persistent definition contains a compatible disk (meaning the
+ definition of the running and persistent config match) a block pull job
+ would leave a dangling pointer in the config definition which resulted
+ in a crash.
+
+ * qemu: Use proper job cancelling command
+
+ Libvirt's API contract for aborting a block copy job in 'ready' state
+ declares that the destination image of the copy will contain a consistent
+ image of the disk from the time when the block job was aborted. This
+ requires that libvirt uses the proper cancelling qemu command to ensure
+ that the data is consistent which was not the case.
+
+ * qemu: Don't attempt storage migration when there are no migratable disks
+
+ Due to a logic bug introduced in the previous release libvirt would attempt
+ to migrate disks in case when no disks are selected/eligible for migration.
+
+ * qemu: Fix very rare race when two block job 'ready' events are delivered
+
+ In certain high-load scenarios, qemu might deliver the 'ready' event twice
+ and if it's delivered when pivoting to the destination during a block copy
+ job, libvirt would get confused and execute the code as if the job were
+ aborted.
v7.2.0 (2021-04-01)
===================
--
2.30.2
3 years, 6 months
[libvirt PATCH] NEWS: mention persistent mediated devices
by Jonathon Jongsma
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
NEWS.rst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 5f8b0ae02d..f64b24a0e6 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -18,6 +18,17 @@ v7.3.0 (unreleased)
The xen driver now supports domains with more than 4TB of memory with
xen >= 4.13.
+ * nodedev: Add ability to manage persistent mediated devices
+
+ Persistent mediated devices can now be managed with libvirt.
+ ``virNodeDeviceDefineXML()`` defines a new device,
+ ``virNodeDeviceUndefine()`` removes an existing definition, and
+ ``virNodeDeviceCreate()`` starts a device definition that is currently
+ inactive. Corresponding virsh commands ``nodedev-define``,
+ ``nodedev-undefine``, and ``nodedev-start`` were also added.
+ ``nodedev-list`` only lists active devices by default. Inactive device
+ definitions can be shown with the new ``--inactive`` and ``--all`` flags.
+
* **Improvements**
* **Bug fixes**
--
2.26.3
3 years, 6 months
[libvirt PATCHv2 0/3] docs: qemu: add socket for virtiofs filesystems
by Ján Tomko
Ján Tomko (3):
docs: document new socket attribute for virtiofs
docs: virtiofs: add section about externally-launched virtiofsd
NEWS: qemu: add socket for virtiofs filesystems
NEWS.rst | 6 ++++++
docs/formatdomain.rst | 10 +++++++++-
docs/kbase/virtiofs.rst | 15 +++++++++++++++
3 files changed, 30 insertions(+), 1 deletion(-)
--
2.29.2
3 years, 6 months
[PATCH] qapi: deprecate drive-backup
by Vladimir Sementsov-Ogievskiy
Modern way is using blockdev-add + blockdev-backup, which provides a
lot more control on how target is opened.
As example of drive-backup problems consider the following:
User of drive-backup expects that target will be opened in the same
cache and aio mode as source. Corresponding logic is in
drive_backup_prepare(), where we take bs->open_flags of source.
It works rather bad if source was added by blockdev-add. Assume source
is qcow2 image. On blockdev-add we should specify aio and cache options
for file child of qcow2 node. What happens next:
drive_backup_prepare() looks at bs->open_flags of qcow2 source node.
But there no BDRV_O_NOCAHE neither BDRV_O_NATIVE_AIO: BDRV_O_NOCAHE is
places in bs->file->bs->open_flags, and BDRV_O_NATIVE_AIO is nowhere,
as file-posix parse options and simply set s->use_linux_aio.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov(a)virtuozzo.com>
---
Hi all! I remember, I suggested to deprecate drive-backup some time ago,
and nobody complain.. But that old patch was inside the series with
other more questionable deprecations and it did not landed.
Let's finally deprecate what should be deprecated long ago.
We now faced a problem in our downstream, described in commit message.
In downstream I've fixed it by simply enabling O_DIRECT and linux_aio
unconditionally for drive_backup target. But actually this just shows
that using drive-backup in blockdev era is a bad idea. So let's motivate
everyone (including Virtuozzo of course) to move to new interfaces and
avoid problems with all that outdated option inheritance.
docs/system/deprecated.rst | 5 +++++
qapi/block-core.json | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 80cae86252..b6f5766e17 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -186,6 +186,11 @@ Use the more generic commands ``block-export-add`` and ``block-export-del``
instead. As part of this deprecation, where ``nbd-server-add`` used a
single ``bitmap``, the new ``block-export-add`` uses a list of ``bitmaps``.
+``drive-backup`` (since 6.0)
+''''''''''''''''''''''''''''
+
+Use ``blockdev-backup`` in pair with ``blockdev-add`` instead.
+
System accelerators
-------------------
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 6d227924d0..8e2c6e1622 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1642,6 +1642,9 @@
# The operation can be stopped before it has completed using the
# block-job-cancel command.
#
+# Features:
+# @deprecated: This command is deprecated. Use @blockdev-backup instead.
+#
# Returns: - nothing on success
# - If @device is not a valid block device, GenericError
#
@@ -1657,7 +1660,7 @@
#
##
{ 'command': 'drive-backup', 'boxed': true,
- 'data': 'DriveBackup' }
+ 'data': 'DriveBackup', 'features': ['deprecated'] }
##
# @blockdev-backup:
--
2.29.2
3 years, 6 months
[PATCH] qemu: add support for max-ram-below-4g option
by Zhiyong Ye
Limit the amount of ram below 4G. This can increase the address space
used by PCI devices below 4G and it can be used by adding attributes in
XML like this:
<domain>
...
<memory unit="MiB" below4g="2048">4096</memory>
...
</domain>
Signed-off-by: Zhiyong Ye <yezhiyong(a)bytedance.com>
Signed-off-by: zhenwei pi <pizhenwei(a)bytedance.com>
Signed-off-by: zhangruien <zhangruien(a)bytedance.com>
---
src/conf/domain_conf.c | 19 +++++++++++++++++++
src/conf/domain_conf.h | 3 +++
src/qemu/qemu_command.c | 4 ++++
3 files changed, 26 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index a72d58f488..c211a69ed1 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4720,6 +4720,19 @@ virDomainDefPostParseMemory(virDomainDef *def,
return -1;
}
+ if (def->mem.max_ram_below_4g &&
+ def->mem.max_ram_below_4g < (1ULL << 10)) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("maximum memory size below the 4GiB boundary is too small, "
+ "BIOS may not work with less than 1MiB"));
+ return -1;
+ } else if (def->mem.max_ram_below_4g > (1ULL << 22)) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("maximum memory size below the 4GiB boundary must be "
+ "less than or equal to 4GiB"));
+ return -1;
+ }
+
return 0;
}
@@ -19786,6 +19799,10 @@ virDomainDefParseMemory(virDomainDef *def,
&def->mem.max_memory, false, false) < 0)
goto error;
+ if (virDomainParseMemory("./memory[1]/@below4g", "./memory[1]/@unit", ctxt,
+ &def->mem.max_ram_below_4g, false, true) < 0)
+ goto error;
+
if (virXPathUInt("string(./maxMemory[1]/@slots)", ctxt, &def->mem.memory_slots) == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("Failed to parse memory slot count"));
@@ -28844,6 +28861,8 @@ virDomainDefFormatInternalSetRootName(virDomainDef *def,
if (def->mem.dump_core)
virBufferAsprintf(buf, " dumpCore='%s'",
virTristateSwitchTypeToString(def->mem.dump_core));
+ if (def->mem.max_ram_below_4g > 0)
+ virBufferAsprintf(buf, " below4g='%llu'", def->mem.max_ram_below_4g);
virBufferAsprintf(buf, " unit='KiB'>%llu</memory>\n",
virDomainDefGetMemoryTotal(def));
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 4838687edf..a939d43e93 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2597,6 +2597,9 @@ struct _virDomainMemtune {
unsigned long long max_memory; /* in kibibytes */
unsigned int memory_slots; /* maximum count of RAM memory slots */
+ /* maximum memory below the 4GiB boundary (32bit boundary) */
+ unsigned long long max_ram_below_4g; /* in kibibytes */
+
bool nosharepages;
bool locked;
int dump_core; /* enum virTristateSwitch */
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index be93182092..c69ad781e6 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6961,6 +6961,10 @@ qemuBuildMachineCommandLine(virCommand *cmd,
cfg->dumpGuestCore ? "on" : "off");
}
+ if (def->mem.max_ram_below_4g > 0)
+ virBufferAsprintf(&buf, ",max-ram-below-4g=%llu",
+ def->mem.max_ram_below_4g * 1024);
+
if (def->mem.nosharepages)
virBufferAddLit(&buf, ",mem-merge=off");
--
2.24.3 (Apple Git-128)
3 years, 6 months
[libvirt PATCH 00/11] ci: helper: Improve cross-building support and more
by Andrea Bolognani
Mainly, this switches the output of the list-images action to be more
compact and changes all actions that work on containers so that the
cross-building architecture is provided as a separate argument.
A few additional cleanups / improvements are thrown in as well.
Andrea Bolognani (11):
ci: util: Drop documentation for api_version parameter
ci: util: Replace get_image_distro() with get_image_info()
ci: util: Document that get_registry_images() returns raw data
ci: util: Add _raw suffix to get_registry_images()
ci: util: Add new get_registry_images() function
ci: helper: Use get_registry_images()
ci: helper: Improve output for list-images action
ci: helper: Add _make_run_action() function
ci: helper: Accept --cross-arch argument
ci: helper: Enable gitlabparser for container actions
ci: helper: Perform some validation on containers
ci/helper | 58 +++++++++++++++++++++++++++----------------
ci/util.py | 73 ++++++++++++++++++++++++++++++++++++++++++------------
2 files changed, 93 insertions(+), 38 deletions(-)
--
2.26.3
3 years, 6 months
[libvirt] how about add a new API for set display parameters
by Yanzheng (A)
Hi team,
struct _virHypervisorDriver now have more than 260 APIs to management various hypervisor drivers,
including hardware resources and lifecycle, etc.
But, there is no API for (re)set display devices and its parameters.
Take the following uses the QEMU driver as an example.
To update the VNC TLS certificates without restart virtual machine, run the following command:
{"execute": "display-reload", "arguments":{"type": "vnc", "tls-certs": true}}
Refers: https://gitlab.com/qemu-project/qemu/-/commit/9cc07651655ee86eca41059f5ea...
Can we add a new libvirt API to set the hypervisor driver display configurations ?
If the committer team thinks it's worth doing, I can submit patches to implement the function.
e,g.
The preceding QMP commands 'display-reload' can be encapsulated in this way:
index 42c75f6cc5..ab5ae0a3e6 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -13218,3 +13218,16 @@ virDomainStartDirtyRateCalc(virDomainPtr domain,
virDispatchError(conn);
return -1;
}
+
+int
+virDomainSetDisplayParameters(virDomainPtr domain,
+ virTypedParameterPtr params,
+ int nparams,
+ unsigned int flags)
+{
+ ...
+ if (conn->driver->domainSetDisplayParameters) {
+ conn->driver->domainSetDisplayParameters(domain, params, nparams, flags);
+ }
+ ...
+}
index d642af8a37..197da82556 100644
--- a/src/driver-hypervisor.h
+++ b/src/driver-hypervisor.h
@@ -1410,6 +1410,12 @@ typedef int
int seconds,
unsigned int flags);
+typedef int
+(*virDrvDomainSetDisplayParameters)(virDomainPtr domain.
+ virTypedParameterPtr params,
+ int nparams,
+ unsigned int flags);
+
typedef struct _virHypervisorDriver virHypervisorDriver;
/**
@@ -1676,4 +1682,5 @@ struct _virHypervisorDriver {
virDrvDomainAuthorizedSSHKeysSet domainAuthorizedSSHKeysSet;
virDrvDomainGetMessages domainGetMessages;
virDrvDomainStartDirtyRateCalc domainStartDirtyRateCalc;
+ virDrvDomainSetDisplayParameters domainSetDisplayParameters;
};
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20454,6 +20454,21 @@ qemuDomainStartDirtyRateCalc(virDomainPtr dom,
return ret;
}
+static int
+qemuDomainSetDisplayParameters(virDomainPtr domain,
+ virTypedParameterPtr params,
+ int nparams,
+ unsigned int flags)
+{
+ ...
+ if (params has 'display-reload')
+ virDomainQemuMonitorCommand(domain, strJsonCmd, &reply,
+ VIR_DOMAIN_QEMU_MONITOR_COMMAND_DEFAULT);
+ else if (...) {
+ /* other display parameters setting */
+ }
+ ...
+}
static virHypervisorDriver qemuHypervisorDriver = {
.name = QEMU_DRIVER_NAME,
@@ -20698,6 +20713,7 @@ static virHypervisorDriver qemuHypervisorDriver = {
.domainAuthorizedSSHKeysSet = qemuDomainAuthorizedSSHKeysSet, /* 6.10.0 */
.domainGetMessages = qemuDomainGetMessages, /* 7.1.0 */
.domainStartDirtyRateCalc = qemuDomainStartDirtyRateCalc, /* 7.2.0 */
+ .domainSetDisplayParameters = qemuDomainSetDisplayParameters; /* 7.2.0 */
};
Regards :)
3 years, 6 months
[libvirt PATCH 00/10] Refactor more XML parsing boilerplate code, part VI
by Tim Wiederhake
For background, see
https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html
Tim Wiederhake (10):
virDomainGraphicsDefParseXMLSDL: Use virXMLProp*
virDomainGraphicsDefParseXMLDesktop: Use virXMLProp*
virDomainGraphicsDefParseXMLSpice: Use virXMLProp*
virDomainGraphicsDefParseXML: Use virXMLProp*
virDomainSoundDef: Change type of model to virDomainSoundModel
virDomainSoundDefParseXML: Use virXMLProp*
virDomainDef: Change type of hyperv_stimer_direct to virTristateSwitch
virDomainDef: Change type of xen_passthrough_mode to
virDomainXenPassthroughMode
virDomainFeaturesDefParse: Use virXMLProp*
virDomainAudioSDLParse: Use virXMLProp*
src/conf/domain_conf.c | 683 +++++-------------
src/conf/domain_conf.h | 6 +-
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_domain_address.c | 2 +-
src/qemu/qemu_validate.c | 2 +-
.../qemuxml2argvdata/aarch64-gic-invalid.err | 2 +-
6 files changed, 206 insertions(+), 491 deletions(-)
--
2.26.3
3 years, 6 months
[PATCH] security: fix virSecurityManagerGetNested access illegal address
by gongwei@smartx.com
When stop libvirtd is used, libvirtd exits the eventloop and cleans up
the driverState first. Then release threadPool. If the workers thread
is still executing at this time, it needs to access driverState.
If the value in driverState is not judged at this time, direct access
will cause an abnormal exit and damage the cache file of libvirt.
In our example, the migration task is in progress at this time,
the source is waiting for the target libvirtd dstFinish to return,
the source libvirtd is stopped, and a crash occurs. After start libvirtd,
the corresponding virtual machine process cannot be managed by libvirt
stack:
#0 virSecurityManagerGetNested (mgr=0x7f76141143c0) at security/security_manager.c:1033
1033 if (STREQ("stack", mgr->drv->name))
(gdb) bt
#0 virSecurityManagerGetNested (mgr=0x7f76141143c0) at security/security_manager.c:1033
#1 0x00007f761c31660e in virQEMUDriverCreateCapabilities (driver=driver@entry=0x7f7614111060)
at qemu/qemu_conf.c:1043
#2 0x00007f761c3168b3 in virQEMUDriverGetCapabilities (driver=0x7f7614111060,
refresh=<optimized out>) at qemu/qemu_conf.c:1103
#3 0x00007f761c334d16 in qemuMigrationCookieXMLParse (flags=32, ctxt=0x7f76040040c0,
doc=0x7f76040425c0, driver=0x7f7614111060, mig=0x7f760400ee10)
at qemu/qemu_migration_cookie.c:1209
#4 qemuMigrationCookieXMLParseStr (flags=32,
xml=0x7f7604004580 "<qemu-migration>\n <name>519ed304-375a-4819-a2d5-2f0ba662b9bc</name>
049152ab-efdf-4aaf-ab08-b57ac1816351</uuid>
<hostname>gongwei-nestedcluster-20210330042359-1</me>
<hostuuid>41d69"..., driver=0x7f7614111060, mig=0x7f760400ee10)
at qemu/qemu_migration_cookie.c:1404
#5 qemuMigrationEatCookie (driver=driver@entry=0x7f7614111060, dom=dom@entry=0x7f7604001ac0,
cookiein=cookiein@entry=0x7f7604004580 "<qemu-migration>
<name>519ed304-375a-4819-a2d5-2f09bc</name>
<uuid>049152ab-efdf-4aaf-ab08-b57ac1816351</uuid>
<hostname>gongwei-nestedcluste0330042359-1</hostname>
<hostuuid>41d69"..., cookieinlen=cookieinlen@entry=1410,
flags=flags@entry=32) at qemu/qemu_migration_cookie.c:1501
#6 0x00007f761c3291d5 in qemuMigrationSrcConfirmPhase (driver=driver@entry=0x7f7614111060,
vm=vm@entry=0x7f7604001ac0,
cookiein=0x7f7604004580 "<qemu-migration>
<name>519ed304-375a-4819-a2d5-2f0ba662b9bc</nameuuid>049152ab-efdf-4aaf-ab08-b57ac1816351</uuid>
<hostname>gongwei-nestedcluster-2021033004235ostname>
<hostuuid>41d69"..., cookieinlen=1410, flags=14875, retcode=retcode@entry=0)
at qemu/qemu_migration.c:2805
#7 0x00007f761c331539 in qemuMigrationSrcPerformPeer2Peer3 (flags=14875, useParams=true,
bandwidth=0, migParams=0x7f760400f070, nbdPort=0, migrate_disks=<optimized out>,
nmigrate_disks=0, listenAddress=<optimized out>, graphicsuri=<optimized out>,
uri=<optimized out>, dname=0x0, persist_xml=0x0, xmlin=<optimized out>, vm=0x7f7604001ac0,
dconnuri=0x7f7604000df0 "qemu+tcp://10.181.177.170/system", dconn=0x7f7604021680,
sconn=0x7f7608001410, driver=0x7f7614111060) at qemu/qemu_migration.c:4202
(gdb) frame 1
#1 0x00007f761c31660e in virQEMUDriverCreateCapabilities (driver=driver@entry=0x7f7614111060)
at qemu/qemu_conf.c:1043
1043 if (!(sec_managers = qemuSecurityGetNested(driver->securityManager)))
(gdb) p *(driver->securityManager)
$2 = {parent = {parent = {u = {dummy_align1 = 140145119544368, dummy_align2 = 0x7f7614114430, s =
magic = 336675888, refs = 32630}}, klass = 0xdeadbeef}, lock = {lock = {__data = {
__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision
__list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0
drv = 0x0, flags = 0, virtDriver = 0x0, privateData = 0x0}
if (STREQ("stack", mgr->drv->name) mgr->drv is 0x0
Signed-off-by: gongwei <gongwei(a)smartx.com>
---
src/security/security_manager.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/security/security_manager.c b/src/security/security_manager.c
index d8b84e2861..96ca9ee861 100644
--- a/src/security/security_manager.c
+++ b/src/security/security_manager.c
@@ -1030,6 +1030,9 @@ virSecurityManagerGetNested(virSecurityManager *mgr)
{
virSecurityManager ** list = NULL;
+ if (mgr == NULL || mgr->drv == NULL)
+ return NULL;
+
if (STREQ("stack", mgr->drv->name))
return virSecurityStackGetNested(mgr);
--
2.24.1
3 years, 6 months