From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fZdQ7EuJ; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 7B2975A0271 for ; Thu, 09 Jul 2026 23:57:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783634226; h=from:from: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; bh=20TYobb68JUEjr9aUwU6hLLe/PvY6wfs23O9KyoS9ts=; b=fZdQ7EuJM+ynHOrOr4AKIrjAPwsVuP6dAAKJucQJjshd/4CvV5SwJ7m6uY5Y6HiRB2f0oO s9zYpFwZ950L5YFQ8a/rg5qm+hlI7iCZSZ1Kx+aJTzbgpr9m69/fcfd716Zr3jV3Af1V9z jyqP10Wlfg8kcEUYZxq6zkHB2qBpZag= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-562-qkE3nPwcP8SWT-wCQUeqWA-1; Thu, 09 Jul 2026 17:57:03 -0400 X-MC-Unique: qkE3nPwcP8SWT-wCQUeqWA-1 X-Mimecast-MFC-AGG-ID: qkE3nPwcP8SWT-wCQUeqWA_1783634222 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BDB7F195606C; Thu, 9 Jul 2026 21:57:01 +0000 (UTC) Received: from jmaloy-thinkpadp16vgen1.rmtcaqc.csb (unknown [10.22.88.44]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D803D1956094; Thu, 9 Jul 2026 21:57:00 +0000 (UTC) From: Jon Maloy To: sbrivio@redhat.com, david@gibson.dropbear.id.au, jmaloy@redhat.com, passt-dev@passt.top Subject: [PATCH v2 1/6] passt: Initialise listening socket fds to -1 Date: Thu, 9 Jul 2026 17:56:51 -0400 Message-ID: <20260709215656.1351549-2-jmaloy@redhat.com> In-Reply-To: <20260709215656.1351549-1-jmaloy@redhat.com> References: <20260709215656.1351549-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: _s2uwLNg1lhknDMiqhIO7NphDu5P_IdEGb7c6orf50I_1783634222 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: OR7UAKNHGNSIRBQPHFMROSLCTF3RCLYG X-Message-ID-Hash: OR7UAKNHGNSIRBQPHFMROSLCTF3RCLYG X-MailFrom: jmaloy@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: fd_tap_listen, fd_control_listen, and fd_repair_listen are file descriptors and should be initialised to -1 rather than the implicit 0, consistent with the other fd fields in passt_ctx. Signed-off-by: Jon Maloy Reviewed-by: David Gibson --- v2: No changes. --- passt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/passt.c b/passt.c index 65a07d72..4e5b9289 100644 --- a/passt.c +++ b/passt.c @@ -65,6 +65,9 @@ char pkt_buf[PKT_BUF_BYTES] __attribute__ ((aligned(PAGE_SIZE))); struct ctx passt_ctx = { .pidfile_fd = -1, .fd_tap = -1, + .fd_tap_listen = -1, + .fd_control_listen = -1, + .fd_repair_listen = -1, .pasta_netns_fd = -1, .device_state_fd = -1, }; -- 2.52.0