[PATCH] domain_cgroup: Fix a condition in virDomainCgroupConnectCgroup()

Ján Tomko jtomko at redhat.com
Tue Apr 19 17:46:48 UTC 2022


On a Tuesday in 2022, Michal Privoznik wrote:
>While parts of QEMU's CGroup code were moved under hypervisor
>agnostic location (src/hypervisor/) a typo sneaked in. The
>inspiration for virDomainCgroupConnectCgroup() comes from
>qemuConnectCgroup(). The former is called upon reconnecting to a
>running domain (after daemon restart). While the latter returned
>early if the daemon was running unprivileged, the former returns
>early if the daemon runs privileged. This is obviously wrong,
>because root can set up CGroups.
>
>Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2075765
>Fixes: 788e2b58cb1896f1c25ebbdbde4bafddc5ed4dc9
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> src/hypervisor/domain_cgroup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220419/23f0113c/attachment.sig>


More information about the libvir-list mailing list