From nobody Sun Feb 8 17:22:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1566305506; cv=none; d=zoho.com; s=zohoarc; b=PIbSRlSjQJLOEt6S5d+1XPIDR91W2FFIwbrDGwh/48A1fPFTjdngx2JmewbCj2ssn/X6n7MvuGkIqOhgRUJLwkdembaowb9inbP0+Ui860tkKDV6brYtHk+572RNQxjtOAODQ5rBNipbE6pj/kZIXoEj1CnaR0cTOOM6fHzgrhE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566305506; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=d4fmUDXs2h3S9IH9rCTCNDcIvOTLBMnUP64yJZSXbfI=; b=oKcqk7Mv6FkmDmI+7wvHj5UAyqAGp6tlADXTdahEYldm2GAKptz4zqH4JZwCnzkFzSO0p1+t5SFCm9eWJxr56PtD/RzDTwtuBHeWQo9A7BFSMUsKD45/taxgDJ0VvMVnyNUlTmu8a3kJnTaTFfUbcC2LsVj7WXSR7rZn0hXGWOU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566305506529144.49276904249814; Tue, 20 Aug 2019 05:51:46 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2F07918C8910; Tue, 20 Aug 2019 12:51:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2D55939C3; Tue, 20 Aug 2019 12:51:43 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CA2D12551C; Tue, 20 Aug 2019 12:51:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7KCpTv4022846 for ; Tue, 20 Aug 2019 08:51:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id DA0603DA5; Tue, 20 Aug 2019 12:51:29 +0000 (UTC) Received: from antique-work.brq.redhat.com (unknown [10.43.2.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 631721F8 for ; Tue, 20 Aug 2019 12:51:29 +0000 (UTC) From: Pavel Hrdina To: libvir-list@redhat.com Date: Tue, 20 Aug 2019 14:51:23 +0200 Message-Id: <57263ddd6493d4452d16e07daec65448fb21f436.1566305450.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] vircgroupv2: fix virCgroupV2GetCpuCfsQuota for "max" value X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Tue, 20 Aug 2019 12:51:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" If the first value in cpu.max is "max" return from function. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1741837 Signed-off-by: Pavel Hrdina --- src/util/vircgroupv2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } =20 - if (STREQLEN(str, "max", 3)) + if (STREQLEN(str, "max", 3)) { *cfs_quota =3D ULLONG_MAX / 1000; + return 0; + } =20 if (virStrToLong_ll(str, &str, 10, cfs_quota) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list