From nobody Mon Feb 9 16:17:19 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=1571412627; cv=none; d=zoho.com; s=zohoarc; b=glbStelw30Zjc+T669gAb1Cwag9vuLZfHoxKA4NYtCIRK1AK9DgxTe/hLj67giZ08F3IMq8BnI2XD+33IUaqTxffsBGV9Uaz72g/954cpCD6lBvK6lLd3JGsL2EQsrMM7em5I+kp18xgynQhujYe6Wz6vNmEjQ5dkarddnOANWg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571412627; h=Content-Type:Content-Transfer-Encoding:Cc: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=zSkFRc7ix6n4jge7Q5rihVpyFgQnFOVUHkuLyc5osLY=; b=hJxJrRAmbI4Pa07xa+FTZ5k0IcZdbzvRgbT08ZYH/koDBbQFTIj1mvYhh79hnudwb3eMfvtujPZYokOdfhkVEPIXYb1+5aJL5/kCZE4Lr5bz8OvpflCnPbgqq+FpKPSrfgnUpRefU2dpStYjihquiLiyvcTzE2eklT3bzrLooSk= 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 1571412627766433.8830381495154; Fri, 18 Oct 2019 08:30:27 -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 A14E6300C5A9; Fri, 18 Oct 2019 15:30:25 +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 6A3325D71C; Fri, 18 Oct 2019 15:30:25 +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 1C1114EE69; Fri, 18 Oct 2019 15:30:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9IFULoj001363 for ; Fri, 18 Oct 2019 11:30:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4F0D75D71C; Fri, 18 Oct 2019 15:30:21 +0000 (UTC) Received: from himantopus.redhat.com (ovpn-116-193.phx2.redhat.com [10.3.116.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13BED5D70E; Fri, 18 Oct 2019 15:30:21 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 18 Oct 2019 10:30:09 -0500 Message-Id: <20191018153017.4819-2-jjongsma@redhat.com> In-Reply-To: <20191018153017.4819-1-jjongsma@redhat.com> References: <20191018153017.4819-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: crobinso@redhat.com Subject: [libvirt] [PATCH v3 1/9] 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 18 Oct 2019 15:30:26 +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 09b6c9a570..92a0df2d75 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -7211,7 +7211,7 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef = *dev, if ((ret =3D qemuDomainDeviceDefValidateAddress(dev, qemuCaps)) < 0) goto cleanup; =20 - if (virDomainCapsDeviceDefValidate(domCaps, dev, def) < 0) + if ((ret =3D virDomainCapsDeviceDefValidate(domCaps, dev, def)) < 0) goto cleanup; =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