From nobody Sun Apr 28 23:33:26 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1556609939; cv=none; d=zoho.com; s=zohoarc; b=HN0wDvzLgBowryJ8UdLzHIbhgJXrbbdlRvLw2GnyZfNlSYCyqjJG+ftJKCJ9el9E+XGsXAcNRDrvPZkakwaUt5KbIYJ2zp3+3cTAHkn4CSLIpYehlMy4TK8rmViH3bmN9Es1ZMzD7TBM05vQpYiQq3qosCv4zcT+d/uM3CAtb30= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556609939; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=nUL2lAtUeN9FUUzFFQ10x7V4A3wuB20cWM4r1zcjYWc=; b=jFCEs/zgBmqsDmR0wDUjj1k7EbYnRZwnw3aXXJaLf9nc0BAA8fWvlLVfU5p1VZCqvQzpItdQzeuoSNwdak3bZTP7Kji5wgidI7bdMF6880OmYJrtgwkr3QOqeJ5ArSLVKrz51uDznpq5hvYAkyZEw9k3qSKwL1+WvpBlnJlOSC8= 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1556609939240895.9991010731471; Tue, 30 Apr 2019 00:38:59 -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 C7F225D68A; Tue, 30 Apr 2019 07:38:56 +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 0CB8761522; Tue, 30 Apr 2019 07:38:56 +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 87A3D18089CB; Tue, 30 Apr 2019 07:38:53 +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 x3U7aJ72009133 for ; Tue, 30 Apr 2019 03:36:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 62FC660C78; Tue, 30 Apr 2019 07:36:19 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 11FE16E717; Tue, 30 Apr 2019 07:36:17 +0000 (UTC) Received: from huawei.com (szxga08-in.huawei.com [45.249.212.255]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6CA35A77F; Tue, 30 Apr 2019 07:36:15 +0000 (UTC) Received: from dggeml406-hub.china.huawei.com (unknown [172.30.72.54]) by Forcepoint Email with ESMTP id B57A14CA27CEE6D66432; Tue, 30 Apr 2019 15:36:12 +0800 (CST) Received: from localhost.localdomain (10.175.104.211) by dggeml406-hub.china.huawei.com (10.3.17.50) with Microsoft SMTP Server id 14.3.439.0; Tue, 30 Apr 2019 15:36:02 +0800 From: Jie Wang To: Date: Tue, 30 Apr 2019 13:24:15 +0800 Message-ID: <1556601855-59450-1-git-send-email-wangjie88@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.104.211] X-CFilter-Loop: Reflected X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 216 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 30 Apr 2019 07:36:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 30 Apr 2019 07:36:16 +0000 (UTC) for IP:'45.249.212.255' DOMAIN:'szxga08-in.huawei.com' HELO:'huawei.com' FROM:'wangjie88@huawei.com' RCPT:'' X-RedHat-Spam-Score: -0.702 (RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS) 45.249.212.255 szxga08-in.huawei.com 45.249.212.255 szxga08-in.huawei.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: wangjie88@huawei.com, jtomko@redhat.com, wu.wubin@huawei.com, eric.fangyi@huawei.com Subject: [libvirt] [PATCH] qemu_command: fix double_close vhostfd in qemuBuildHostdevCommandLine 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.39]); Tue, 30 Apr 2019 07:38:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" vhostfd passed to cmd->passfd in virCommandPassFD, virCommandFree will always close cmd->passfd when qemuBuildSCSIVHostHostdevDevStr failed. Signed-off-by: Jie Wang --- src/qemu/qemu_command.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 029780fe86..3fc2dfa2f1 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5819,7 +5819,6 @@ qemuBuildHostdevCommandLine(virCommandPtr cmd, qemuCaps, vhostfdName= ))) { VIR_FREE(vhostfdName); - VIR_FORCE_CLOSE(vhostfd); return -1; } virCommandAddArg(cmd, devstr); --=20 2.16.2.windows.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list