mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu: virtiofs: do not crash if cgroups are missing
On domain startup, qemuSetupCgroupForExtDevices checks if a cgroup controller is present and skips the setup if not. Add a similar check to qemuVirtioFSSetupCgroup to prevent crashing when hotplugging a virtiofs filesystem. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
0bb33164d0
commit
a9da009219
@ -353,6 +353,9 @@ qemuVirtioFSSetupCgroup(virDomainObj *vm,
|
||||
pid_t pid = -1;
|
||||
int rc;
|
||||
|
||||
if (!cgroup)
|
||||
return 0;
|
||||
|
||||
if (!(pidfile = qemuVirtioFSCreatePidFilename(vm, fs->info.alias)))
|
||||
return -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user