From nobody Mon Feb 9 22:59:54 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=1570829282; cv=none; d=zoho.com; s=zohoarc; b=U/A1wqLBvj1EIDCM1ZoOo29rSPULnosuVyTif1nW+eVUqdu977Qmhoir+pYhwJlpHJqGH8w8XIt0qt9KMYdooaav9LabO7BOrrmsCZjEK0ks5ohbt3oDGLzc5kFY4UVWMbSRfnjIhG1QxqKBLoovsvbVziJr38XngaZ8MIjbaJY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570829282; 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; bh=gksjx3+DecYS9LYJC48C5RK19/1nxKVFsvGANKtxIcU=; b=E7iaN+8mZjiSQZgdpvrsvKky7VwD0gkbsIkIHzPC1UJetdj1/AdjARkulu4Rn/Iri36BG36h9hI/zzZ33eQy2dygsiO2pny6O/6vgxmaEnygwxlHk63/8fbjCtD61VzhgyCSWxJYsTg8txaL97cdRR/l+56Z/nIjp+BFVqQBErI= 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 1570829282791136.82052686529437; Fri, 11 Oct 2019 14:28:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4F6A4309C385; Fri, 11 Oct 2019 21:28:01 +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 297C05DA8D; Fri, 11 Oct 2019 21:28:01 +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 DB17783737; Fri, 11 Oct 2019 21:28:00 +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 x9BLRwo9007290 for ; Fri, 11 Oct 2019 17:27:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id CB7636017E; Fri, 11 Oct 2019 21:27:58 +0000 (UTC) Received: from himantopus.redhat.com (ovpn-118-45.phx2.redhat.com [10.3.118.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 90E59600CC; Fri, 11 Oct 2019 21:27:58 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 11 Oct 2019 16:27:49 -0500 Message-Id: <20191011212752.27139-4-jjongsma@redhat.com> In-Reply-To: <20191011212752.27139-1-jjongsma@redhat.com> References: <20191011212752.27139-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/6] qemu: fix domain device validation 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 11 Oct 2019 21:28:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" When the virDomainCapsDeviceDefValidate() function returned an error status (-1), we were aborting the function early, but returning the default return value (0). This patch properly returns an error in that case. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 516ae7e444..bc455e7da3 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -7213,7 +7213,7 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef = *dev, if ((ret =3D qemuDomainDeviceDefValidateAddress(dev, qemuCaps)) < 0) return ret; =20 - if (virDomainCapsDeviceDefValidate(domCaps, dev, def) < 0) + if ((ret =3D virDomainCapsDeviceDefValidate(domCaps, dev, def)) < 0) return ret; =20 switch ((virDomainDeviceType)dev->type) { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list