From nobody Sun Feb 8 18:39:21 2026 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=1605541205; cv=none; d=zohomail.com; s=zohoarc; b=FaCRv6yNefZsrY30/kQjhq2DBNNFPZm/GLy5fU48IdtrjS+fUFPQfGrLlN3UG+347HHt/ZHGQ7s3wu06v2acx1xxlrMeZZdLELM0bwnbL0sx79vaeBA0Qfzoz1snEbM0CGdfP0sSR39Ik2ZiuyJ/73CdI1Rgtw/zxh2DNKbysLM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605541205; 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=Uaq7y3F5nLURzURUuqth8QOcPmdraNZsNuptdBYGdqE=; b=BBkOTfHI61jWL+pE+dv1sATO5F7Qcq6s93ELp3ADJi7Bj1sXp8SkhuSttlVsyasuFVFkegq/3dgk36PUGK/E2bISBAFBneH3czL2PZ4Wfsl0457SS+ESMyBtm90PPAAqNUqD6r3HzG820i5bnwJwruNKbP6wPbVDMqNiGD/BNl8= 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) header.from= 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 1605541205090666.1653435973151; Mon, 16 Nov 2020 07:40:05 -0800 (PST) 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-147-kB1sfjekONyxKeBiQY354g-1; Mon, 16 Nov 2020 10:39:52 -0500 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 7F2FE1028D6D; Mon, 16 Nov 2020 15:39:42 +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 5652E19646; Mon, 16 Nov 2020 15:39:42 +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 1F1C3183D023; Mon, 16 Nov 2020 15:39:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AGFd7n5022559 for ; Mon, 16 Nov 2020 10:39:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id 829EA6EF51; Mon, 16 Nov 2020 15:39:07 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.193.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0004B6EF58 for ; Mon, 16 Nov 2020 15:39:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605541203; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Uaq7y3F5nLURzURUuqth8QOcPmdraNZsNuptdBYGdqE=; b=BHIXbRRsgnBlaaW/65qFOCQ0pSg8kgp92LyOlUfo0RwSVjG1HrE0d1Nub+JYRM1pghQIgx 9GXD38D7mhmUg7Z91HYhowQnh+PTRT4p4BfLuWze/Ih6GPkdxSCtWI1A7YRKwmiy0AkFXb 5whsloeiwK5g2UwFwEqz+FIrPKzmiFE= X-MC-Unique: kB1sfjekONyxKeBiQY354g-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 05/11] qemu_command: fix FD usage in qemuBuildInterfaceCommandLine Date: Mon, 16 Nov 2020 16:38:52 +0100 Message-Id: <6798ecda5d3a184e8002ba1d52762a4b2144851d.1605541084.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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) Content-Type: text/plain; charset="utf-8" If virCommandPassFD() is called with VIR_COMMAND_PASS_FD_CLOSE_PARENT the passed FD is closed and should not be used after that call. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 0eec35da16..0580feb475 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8142,7 +8142,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver, g_autofree char *fdset =3D NULL; g_autofree char *addfdarg =3D NULL; =20 - virCommandPassFD(cmd, vdpafd, VIR_COMMAND_PASS_FD_CLOSE_PARENT); + virCommandPassFD(cmd, vdpafd, 0); fdset =3D qemuVirCommandGetFDSet(cmd, vdpafd); if (!fdset) goto cleanup; --=20 2.26.2