From nobody Sun Feb 8 17:22:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1618928148; cv=none; d=zohomail.com; s=zohoarc; b=j0BV0oRCBWgq3SNNAbzNh0FuSpCL9de8NWs8oXXyeJ8tU3FIH8CJ9l/VYy9+PUTKi254Rt3hStwU6kY1dH681AOELFI4ySEWw5d3Zg5tx8ZVOalxaUtcL/36nr9Q7+pHrBi/3p6yTjG5gS72n8y9tjQmRdth9sYTvFgX/CblV3w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618928148; 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=7LgCYSzgpeFTht/Raj3Fo41hjCjJiuK4ebp4uzoDwZc=; b=lXNQInCZtDYmIAvslQiaDyOpL1Bk/DUltly661GushK2ckNgeetuIMcLYm/oa0Y2NOltMQnOk0AgJk2u32m0OYTYfNfhmvtOIEaz09HL2C3iD5xvgfXh8zhibdc/azfLVy6qFt9yWfX0+izhla5x4nWnqr0PPl+HCoCZcshDTYw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 1618928148352482.607330602513; Tue, 20 Apr 2021 07:15:48 -0700 (PDT) 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-224-QMYIyZkmO4OI5X3VNAMJLQ-1; Tue, 20 Apr 2021 10:15:40 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id D266E81431F; Tue, 20 Apr 2021 14:15:35 +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 B2FF52C01F; Tue, 20 Apr 2021 14:15:35 +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 7AADC44A5C; Tue, 20 Apr 2021 14:15:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13KEFOh7005664 for ; Tue, 20 Apr 2021 10:15:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id C0C175C1C4; Tue, 20 Apr 2021 14:15:24 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.241]) by smtp.corp.redhat.com (Postfix) with ESMTP id 43B8F5C1B4 for ; Tue, 20 Apr 2021 14:15:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618928144; 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=7LgCYSzgpeFTht/Raj3Fo41hjCjJiuK4ebp4uzoDwZc=; b=DdiKaVWqkR0NlR7eEGJMpvIdKb3U0cGwCzxuGqduFu4J4eM+IaF9p6leX0DxCsz9AkLGM1 FFfwzk7Wp7ljwg1UL+271bAegdG8He/n5keRXALPJJ/SHXA3UlkiFWgNawuzSDBSuc7Ynx 73TfsGJKMhYpgUosLX405gK9B0KoPfU= X-MC-Unique: QMYIyZkmO4OI5X3VNAMJLQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/4] lxc_controller: Move closing of handshakeFd out of virLXCControllerDaemonHandshake() Date: Tue, 20 Apr 2021 16:15:16 +0200 Message-Id: <1235e10e2001cb9baa3bf0559ce009e3117d9f45.1618928033.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.79 on 10.5.11.11 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" Future commits will want to reuse the handshakeFd and thus it mustn't be closed in virLXCControllerDaemonHandshake(). Do the closing explicitly afterwards. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- src/lxc/lxc_controller.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 50b2987d9a..797547b05c 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -353,7 +353,6 @@ static int virLXCControllerDaemonHandshake(virLXCContro= ller *ctrl) _("error sending continue signal to daemon")); return -1; } - VIR_FORCE_CLOSE(ctrl->handshakeFd); return 0; } =20 @@ -2403,6 +2402,9 @@ virLXCControllerRun(virLXCController *ctrl) if (virLXCControllerDaemonHandshake(ctrl) < 0) goto cleanup; =20 + /* and preemptively close handshakeFd */ + VIR_FORCE_CLOSE(ctrl->handshakeFd); + /* We must not hold open a dbus connection for life * of LXC instance, since dbus-daemon is limited to * only a few 100 connections by default --=20 2.26.3