From nobody Sun Feb 8 14:41:49 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=1566891258; cv=none; d=zoho.com; s=zohoarc; b=PS00gir/ISSpyUmkurNyrd2shCaX1sEMxFQ0PgqKMh3QsnRUraUPdBD++B4ZnmA3o0V9X+aTsPvq94WsBUeQSivG3ITDDX5/PfdSn7xp6HVR4YSBmpr8fdqkFeCM33PVPzpV3Fh0+qlg86v8qClYGGkRpomajj+L0Gb+9XSd7AA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566891258; 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=JohzAXd/P1bBtxKrIxH3Gp7lxLyTe92XnFO031BDam0=; b=GoUhi7LgG/y86tT1m9BB7RHyZO9lFyxJrClQwwJsfUf76qk1BO4nulk5r+cxm8FusHSYPkflf34tVxrF/JMYErsLckjyJSY0y0jXWoqDpG7X/KTcdJ0ToZfsSaWBy8NpLiQ+BntHAhq1GZU2gIdnl2dlKOQXlCUT0ObSVJuowrw= 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 1566891258221370.471335913776; Tue, 27 Aug 2019 00:34:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F1DB63084025; Tue, 27 Aug 2019 07:34:16 +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 C575A600D1; Tue, 27 Aug 2019 07:34:16 +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 8D75C1806B00; Tue, 27 Aug 2019 07:34:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7R7YFS3006655 for ; Tue, 27 Aug 2019 03:34:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 87C165DA8B; Tue, 27 Aug 2019 07:34:15 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 117DC5D9CC for ; Tue, 27 Aug 2019 07:34:14 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 27 Aug 2019 09:34:07 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] qemu: Acquire domain job in qemuDomainGetFSInfo and qemuDomainGetGuestInfo 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 27 Aug 2019 07:34:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" These two functions work with vm->def in their critical sections (i.e. after the job was acquired and before it is released). But that means, they need QUERY domain job too to prevent vm->def change. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c5a0c38c16..2b70f9f83e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -22143,7 +22143,9 @@ qemuDomainGetFSInfo(virDomainPtr dom, if (virDomainGetFSInfoEnsureACL(dom->conn, vm->def) < 0) goto cleanup; =20 - if (qemuDomainObjBeginAgentJob(driver, vm, QEMU_AGENT_JOB_QUERY) < 0) + if (qemuDomainObjBeginJobWithAgent(driver, vm, + QEMU_JOB_QUERY, + QEMU_AGENT_JOB_QUERY) < 0) goto cleanup; =20 if (virDomainObjCheckActive(vm) < 0) @@ -22163,7 +22165,7 @@ qemuDomainGetFSInfo(virDomainPtr dom, qemuDomainObjExitAgent(vm, agent); =20 endjob: - qemuDomainObjEndAgentJob(vm); + qemuDomainObjEndJobWithAgent(driver, vm); =20 cleanup: virDomainObjEndAPI(&vm); @@ -23241,7 +23243,9 @@ qemuDomainGetGuestInfo(virDomainPtr dom, if (virDomainGetGuestInfoEnsureACL(dom->conn, vm->def) < 0) goto cleanup; =20 - if (qemuDomainObjBeginAgentJob(driver, vm, QEMU_AGENT_JOB_QUERY) < 0) + if (qemuDomainObjBeginJobWithAgent(driver, vm, + QEMU_JOB_QUERY, + QEMU_AGENT_JOB_QUERY) < 0) goto cleanup; =20 if (!qemuDomainAgentAvailable(vm, true)) @@ -23291,7 +23295,7 @@ qemuDomainGetGuestInfo(virDomainPtr dom, qemuDomainObjExitAgent(vm, agent); =20 endjob: - qemuDomainObjEndAgentJob(vm); + qemuDomainObjEndJobWithAgent(driver, vm); =20 cleanup: virDomainObjEndAPI(&vm); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list