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=d7FMA32v; 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 BBAEE5A027E for ; Mon, 12 May 2025 23:20:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747084855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N6RbzNvmARFzMoPvz5BgwKmR5usbimDgVsSrZ8lrsxo=; b=d7FMA32vwwXhctBdltNCbxmeHFwML9hUSdsJ6IkcdN6Iuo7xhO2e9NdYeX6RMcf0C7fOTb JCcEXhwvpStpGyIRSBB4DNeiFhOYDcNB4SQHppbEHzSCSLaRJ2fLO1FpvjGAU36p/5xkHZ e7HMJTqqWSeFV+Y72pMd3PnnxPqhpNM= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-196-KuwsuxWhOOa4PXQyNqxEeA-1; Mon, 12 May 2025 17:20:54 -0400 X-MC-Unique: KuwsuxWhOOa4PXQyNqxEeA-1 X-Mimecast-MFC-AGG-ID: KuwsuxWhOOa4PXQyNqxEeA_1747084853 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-440667e7f92so24050595e9.3 for ; Mon, 12 May 2025 14:20:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747084852; x=1747689652; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=N6RbzNvmARFzMoPvz5BgwKmR5usbimDgVsSrZ8lrsxo=; b=fjPhcG7LvAb46nhXE5fZE6dUo0+5SElcRvj+HZIglrDBfrnryTpheNeh7zC+6TP2n8 aR7wiGR3Ogzz/zdMuwlTfUq153bLvQkGEc07w6dyso4c8IN3ac4ESMGbj1AZS1Q7ulSp xRVAang4TpewP2xVkdHqlqBovZK7M1nAGmFophTWnAYacHKVVn+Q3jPb8SLP69Pkm84z 9qRcmo2UhFQHCVdw1uvZychaRggq7/tKpv7OkUkao32blNEu4Knm7nDIT8r4VOaYe8wk EyErcSxJdBkLxqpBRXrgAh0egkrjBj1bc/ih/cy/DT7rWIX/gkhyyySiFa05tQsVN3bq JtXg== X-Gm-Message-State: AOJu0YwFiR5q2QbL4e1GO4bP3FrFFv8+TwGOM1vZqadXvnCzM6qO96EF qvu9aKkbrAUHMfxgPPLQf4E38VGpxQgZpBi9cOqAefwjVt8/AsooCtCGj5j6Ytkr9aaMdPg7HfV rtpxz5OggkJatFTMxACxdYrBUDXdbi2zZRsmYq5pYPc9GVAO6Q+yfjpg/EsrVKlIQVLr6UjOKnN +XICvH93QpWur2Se9eQMc9lahX+Byg24ii X-Gm-Gg: ASbGncuX7wjlheO2lp7HRznqVB2Ui6+votK3d1N0apHAvOFWA5hb1ezOIZghJQww/48 XiIaQAqDfAG3FUxgRuRZHhPGDbPDbx266e4POOPL4rY9gMXUZ8qFBl1z3BXNrm9RlvtYhNdpEGI ZQrTgLiJotzmzVZP4G/6AXpJWOF6JsRt8Y2Rgjm+WVL+ooImhnte2qt7NEoFeAka+Tr3s+ChbQG 5YnhLEp0WN4wRLdChdz/sCBf0Se6BdBF638Qb21Hi+/R6I2UiU7EFsitvlHsDS/hR3cUjDNjrYp b+CF478hqvaTsDjZCbS4abFBN8XT+TEkEaPLlw1A X-Received: by 2002:a05:600c:190d:b0:441:b698:3431 with SMTP id 5b1f17b1804b1-442d6dde8e8mr100709575e9.28.1747084852195; Mon, 12 May 2025 14:20:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESYFiNwPLNO8OxQyH7VcQvN6JECgWwfj2gYEJ/NcGLtqa2HwIaKA9M1W6mzmF3isSP7+nFtQ== X-Received: by 2002:a05:600c:190d:b0:441:b698:3431 with SMTP id 5b1f17b1804b1-442d6dde8e8mr100709455e9.28.1747084851808; Mon, 12 May 2025 14:20:51 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-442cd32835dsm184672205e9.6.2025.05.12.14.20.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 14:20:51 -0700 (PDT) Date: Mon, 12 May 2025 23:20:50 +0200 From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH] flow: close socket fd on error Message-ID: <20250512232050.1e54e0da@elisabeth> In-Reply-To: <20250512164700.1309894-1-lvivier@redhat.com> References: <20250512164700.1309894-1-lvivier@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: veRDvlB9GKzZTph0CYgRJHTrF4mLtr_CjUPziCLEK6A_1747084853 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: M3JTCH6HPEWHLHUF3RUEIX4DBGR7L3MG X-Message-ID-Hash: M3JTCH6HPEWHLHUF3RUEIX4DBGR7L3MG X-MailFrom: sbrivio@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 CC: passt-dev@passt.top 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: On Mon, 12 May 2025 18:47:00 +0200 Laurent Vivier wrote: > In eea8a76caf85 ("flow: fix podman issue #26073"), we unregister > the fd from epoll_ctl() in case of error, but we also need to close it. > > As flowside_sock_l4() also calls sock_l4_sa() via flowside_sock_splice() > we can do it unconditionally. The previous PIF_HOST check made sense to me because it excluded PIF_TAP, not so much because it excluded PIF_SPLICE. But anyway, we'll never reach here with anything that's not PIF_HOST nor PIF_TAP (kind of by definition), and a spurious epoll_del() is surely better than the alternative in any case... > Fixes: eea8a76caf85 ("flow: fix podman issue #26073") > Signed-off-by: Laurent Vivier Applied, thanks. New release coming soon. -- Stefano