From nobody Sun May 5 20:18:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1624273716; cv=none; d=zohomail.com; s=zohoarc; b=huDGc+mtnxM1XGpsOqa8Ek5pdw5tRzqtPhCJTuiH+hwutMaFIGHl/QM0ePx+qGAi8zYr/hiv+A3GAA/BUkkkIIgoxWEemYSxA3nhU8xCL27q+t7CefDNJ31JlQ8MXXg/pnXeot16MMWM8VaUlSHrCmjWv4Qqxyn4IkptX/aIz88= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624273716; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=vn2HlFE6q1Nr2wJjFk6GpLqfVpXI5fOYdBgq0JF25C8=; b=oF4FEmNy+RFdm8IuhaGXUohj7bFOhK20Z06a+mW4ii7tBXILjB87siTmlkM7mhEF3/wbOXu4feNoAqk3dQ7nNLztisFihHSnGt0CeRUh2J+gBeKjK87UtFCvJs79PV2a5YPaYPUFkn1scC8sLfDWofJEzYO6Nfzt47kDECokkNU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1624273716805446.8068103230879; Mon, 21 Jun 2021 04:08:36 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-269-FOS4oUt6OcK_jrCq5caQEw-1; Mon, 21 Jun 2021 07:08:33 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E7F1D1084F4C; Mon, 21 Jun 2021 11:08:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7710960C9F; Mon, 21 Jun 2021 11:08:27 +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 6EDC21809C99; Mon, 21 Jun 2021 11:08:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 15LB8O3A006366 for ; Mon, 21 Jun 2021 07:08:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id D1E4018AD4; Mon, 21 Jun 2021 11:08:24 +0000 (UTC) Received: from antique-work.lan (unknown [10.40.195.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C60469CB4 for ; Mon, 21 Jun 2021 11:08:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624273715; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=vn2HlFE6q1Nr2wJjFk6GpLqfVpXI5fOYdBgq0JF25C8=; b=YQ5Ul9qG6G09YIlB7wkoqfIpg9rnrmWrpYW4HeqD+mbC+zPCjf0sLZno+xWnW5f+KPscg/ oZA/D75OYqiDbq9XraNvcy3Jil846mtOHfS5RRAwG/UkGjCMpFx4EgyCcvV4Yh/fI+jMKE cYM8BaXKxssIxd/PiAj9/lUhyi/yWLw= X-MC-Unique: FOS4oUt6OcK_jrCq5caQEw-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH] virresctrl: fix starting VMs with cputune.memorytune specified Date: Mon, 21 Jun 2021 13:08:19 +0200 Message-Id: <67e05d9cb5e660635bb2fd28cfaffc16fc5fa523.1624273682.git.phrdina@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" When removing check for return value of VIR_EXPAND_N this place was incorrectly modified causing failure to start a VM with cputune memorytune configured with useless error message: error: Failed to start domain 'vm1' error: An error occurred, but the cause is unknown Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1973094 Fixes: 7d2fd6ef0163a939adb7ce0f0fad3b7654c340de Signed-off-by: Pavel Hrdina Reviewed-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa --- src/util/virresctrl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index a03113d4d6..35e92022db 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -1437,7 +1437,6 @@ virResctrlAllocParseProcessMemoryBandwidth(virResctrl= Info *resctrl, if (alloc->mem_bw->nbandwidths <=3D id) { VIR_EXPAND_N(alloc->mem_bw->bandwidths, alloc->mem_bw->nbandwidths, id - alloc->mem_bw->nbandwidths + 1); - return -1; } if (!alloc->mem_bw->bandwidths[id]) alloc->mem_bw->bandwidths[id] =3D g_new0(unsigned int, 1); --=20 2.31.1