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=LRYA1fvk; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id D32F05A0262 for ; Thu, 09 Jul 2026 00:32:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783549931; 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=cGomVxNTEXC0jmEBWZkgHF1eBO9ViQwxtlLROH1Pm24=; b=LRYA1fvk90u390+xICgs3pYDrcLFCfanNs2gwi/IJsU1oytCxEq4uDdtpxDc1HfpFh5FdI SNlXgZgTpVomUdyFuxbd+B5OLX/OxqpzNlc/RFECXhWF+Sd8GMbJ9iYHbqU4TewOfB+LAX v15pGoam58jjKmC3MGD9ffECKkIpR9k= Received: from mx-prod-mc-03.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-493-oPkXNO9gOkKIf2ev9ahmRA-1; Wed, 08 Jul 2026 18:32:08 -0400 X-MC-Unique: oPkXNO9gOkKIf2ev9ahmRA-1 X-Mimecast-MFC-AGG-ID: oPkXNO9gOkKIf2ev9ahmRA_1783549927 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1DB5D1956045; Wed, 8 Jul 2026 22:32:07 +0000 (UTC) Received: from jmaloy-thinkpadp16vgen1.rmtcaqc.csb (unknown [10.22.88.44]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C530B1955F76; Wed, 8 Jul 2026 22:32:05 +0000 (UTC) From: Jon Maloy To: sbrivio@redhat.com, david@gibson.dropbear.id.au, jmaloy@redhat.com, passt-dev@passt.top Subject: [PATCH 1/7] passt: Initialise listening socket fds to -1 Date: Wed, 8 Jul 2026 18:31:57 -0400 Message-ID: <20260708223203.885345-2-jmaloy@redhat.com> In-Reply-To: <20260708223203.885345-1-jmaloy@redhat.com> References: <20260708223203.885345-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: p4j6Y5zr89MKcW6MT0Z5DZ8GWE-YTBCYY3aUpiRtRqM_1783549927 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: IZEZ5J64ZIDIR3W2R4VXF4ECFJKBTVSF X-Message-ID-Hash: IZEZ5J64ZIDIR3W2R4VXF4ECFJKBTVSF 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 --- 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