mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu_cgroup: Drop ENOENT special case for RNG devices
When allowing or denying RNG device in CGroups there's a special check if the backend device exists (errno == ENOENT) in which case success is returned to caller. This is in contrast with the rest of the functions and in fact wrong too - if the backend device doesn't exist then QEMU will fail opening it. Might as well signal error here. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
a29db4fbed
commit
bc51dac713
@ -630,8 +630,7 @@ qemuSetupRNGCgroup(virDomainObj *vm,
|
|||||||
virDomainAuditCgroupPath(vm, priv->cgroup, "allow",
|
virDomainAuditCgroupPath(vm, priv->cgroup, "allow",
|
||||||
rng->source.file,
|
rng->source.file,
|
||||||
"rw", rv);
|
"rw", rv);
|
||||||
if (rv < 0 &&
|
if (rv < 0)
|
||||||
!virLastErrorIsSystemErrno(ENOENT))
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -657,8 +656,7 @@ qemuTeardownRNGCgroup(virDomainObj *vm,
|
|||||||
virDomainAuditCgroupPath(vm, priv->cgroup, "deny",
|
virDomainAuditCgroupPath(vm, priv->cgroup, "deny",
|
||||||
rng->source.file,
|
rng->source.file,
|
||||||
"rw", rv);
|
"rw", rv);
|
||||||
if (rv < 0 &&
|
if (rv < 0)
|
||||||
!virLastErrorIsSystemErrno(ENOENT))
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user