From: Pavel Hrdina Date: Tue, 20 Aug 2019 11:59:54 +0000 (+0200) Subject: vircgroupv2: fix virCgroupV2GetCpuCfsQuota for "max" value X-Git-Tag: v5.7.0-rc1~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23689cddd4542041cdfa3416705993d373033961;p=thirdparty%2Flibvirt.git vircgroupv2: fix virCgroupV2GetCpuCfsQuota for "max" value If the first value in cpu.max is "max" return from function. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1741837 Signed-off-by: Pavel Hrdina Reviewed-by: Jiri Denemark --- diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index 59ef2e6397..c62ee0d933 100644 --- a/src/util/vircgroupv2.c +++ b/src/util/vircgroupv2.c @@ -1582,8 +1582,10 @@ virCgroupV2GetCpuCfsQuota(virCgroupPtr group, return -1; } - if (STREQLEN(str, "max", 3)) + if (STREQLEN(str, "max", 3)) { *cfs_quota = ULLONG_MAX / 1000; + return 0; + } if (virStrToLong_ll(str, &str, 10, cfs_quota) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR,