From nobody Tue Apr 30 11:49:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.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=1636052110; cv=none; d=zohomail.com; s=zohoarc; b=QKzjTKAPJuAnVY/LqpexRrs3eV5RtyNRF74U5kAd50I4oTexoo7KxvOV1kKXBqgIeDuOWNUQcxQ5EI1PJeSeX2LbAth+aPZAe6K6c0drVzMVN5sSM4HF0YbB8CA7Xh1qHnrwFOPLX98vGvmtiuePtwD/9ZhzPwna7G4gAFDXddE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636052110; 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=I1Ym14qRus8vAclTKUlroZRNGmZaVcmTk50p1BG7hSc=; b=b5hw0iLEzm/1EPJGck0kaUnxfrOCffnwXZBVaEYEZ+CHElPd/X2nqjfoyP2KmK4TDjX+1aH9kocUIZjPDT2hgLSqmBU0BR4hvBnXY8YUbAUD+0XLp2NI+Bw5qeQhFoBWk5wJumzgHC1m2GMogYRnJb5WHUZ+h98nP/Nxg5j7YDc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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 [170.10.129.124]) by mx.zohomail.com with SMTPS id 163605211032065.87395563379164; Thu, 4 Nov 2021 11:55:10 -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-289-LmFmVApWPoK4mLHWc1gvEw-1; Thu, 04 Nov 2021 14:55:07 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 50B41801B01; Thu, 4 Nov 2021 18:55:02 +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 29A7843FD9; Thu, 4 Nov 2021 18:55:02 +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 C98EC4E58E; Thu, 4 Nov 2021 18:55:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1A4It1BJ014302 for ; Thu, 4 Nov 2021 14:55:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2536560C17; Thu, 4 Nov 2021 18:55:01 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.40.195.139]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC5BD60C0F for ; Thu, 4 Nov 2021 18:54:55 +0000 (UTC) Received: by rein.int.mamuti.net (Postfix, from userid 500) id 8510018013D; Thu, 4 Nov 2021 19:54:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636052109; 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=I1Ym14qRus8vAclTKUlroZRNGmZaVcmTk50p1BG7hSc=; b=XRL7aHvHPqH4EQs0TIlqHvnIZqks6q2ixyrsvDeJVKVeRE0+aQpIWbAQ4P34LDyYsEPD/O rTGqiDxE+2m3pse9F2/0h1FmGWGqY6FreeyLfVt8EOg8Y62ps+OwHa28Ri7RMv91UafPjZ wrK6Js6JFg4r1UTJShLo1u4seNbPo6o= X-MC-Unique: LmFmVApWPoK4mLHWc1gvEw-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: Do not pass negative ncpus to virCapabilitiesClearHostNUMACellCPUTopology Date: Thu, 4 Nov 2021 19:54:51 +0100 Message-Id: <876a27a6f72e8f5455b65959021d1408071b2d71.1636052091.git.jdenemar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.84 on 10.5.11.23 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) X-ZM-MESSAGEID: 1636052112127100001 Content-Type: text/plain; charset="utf-8" It won't cause any harm as cpus is NULL when we pass a negative ncpus, but doing so when the function expects unsigned value is not right. Signed-off-by: Jiri Denemark Reviewed-by: Michal Privoznik --- src/conf/capabilities.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index a3e68741a9..cea4803fc8 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -1954,6 +1954,7 @@ virCapabilitiesHostNUMAInitReal(virCapsHostNUMA *caps) if (ncpus =3D=3D -2) continue; =20 + ncpus =3D 0; goto cleanup; } =20 --=20 2.33.1