From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202504 header.b=WB+rXwsE; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 6133D5A027E for ; Wed, 14 May 2025 08:05:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202504; t=1747202734; bh=0EOKnIZoo/bE1g8n0BBWdDRmhtPpV7cmRhbfk+v0jXk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WB+rXwsEwS7kK4f3v79NAwdYIFJDIb019c2ehBGr+NgnWH/oNbohZU8Y9D+uUjL05 xe25Ay/VboHMZE+AWug4MvrRuHc0t/k49gV1coDlaLTyvzChy3bvVNtaxw/q99suVP b+r8T4mFm+NZ10cXco7mpcckwunhEj+MAvOQlWEzayDhk1k8UXldAK4PZKOoKn/lpG BC2NvA3yNRFdJLm01+DdAbyiNo4w9wix/YAXfaZZbO1v/krkAKy+NLAn6sdmF3Vjbt xNJxswRe/r7pP/jjj2c4iZ5bv+hKUlkWD8nAPfIbmIlw28YeqRQ4XeyLluNHqlAsLg OYSJYojpWZ7+Q== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Zy2rZ6XFSz4wd0; Wed, 14 May 2025 16:05:34 +1000 (AEST) Date: Wed, 14 May 2025 16:05:30 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] flow: close socket fd on error Message-ID: References: <20250512164700.1309894-1-lvivier@redhat.com> <20250512232050.1e54e0da@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FwcyyavetwXuQKZG" Content-Disposition: inline In-Reply-To: <20250512232050.1e54e0da@elisabeth> Message-ID-Hash: QCPZVCVYDKIICIJOZAW4NW67JDN2VMWE X-Message-ID-Hash: QCPZVCVYDKIICIJOZAW4NW67JDN2VMWE X-MailFrom: dgibson@gandalf.ozlabs.org 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: Laurent Vivier , 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: --FwcyyavetwXuQKZG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 12, 2025 at 11:20:50PM +0200, Stefano Brivio wrote: > On Mon, 12 May 2025 18:47:00 +0200 > Laurent Vivier wrote: >=20 > > 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. > >=20 > > As flowside_sock_l4() also calls sock_l4_sa() via flowside_sock_splice() > > we can do it unconditionally. >=20 > The previous PIF_HOST check made sense to me because it excluded > PIF_TAP, not so much because it excluded PIF_SPLICE. Right. pif_is_socket() exists for exactly that case.. > 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... =2E.but in this case it's not relevant because you have to already have a socket by this point. >=20 > > Fixes: eea8a76caf85 ("flow: fix podman issue #26073") > > Signed-off-by: Laurent Vivier >=20 > Applied, thanks. New release coming soon. >=20 --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --FwcyyavetwXuQKZG Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmgkMqkACgkQzQJF27ox 2GejgA//VJh0g4fjTbB8VKH7ku52+A84k4gaFlicYZq5Gh2WFDbLDEPCFagAN3OU lqxuuSnVnFgmNeP3XMKI003XfwQ57BUIPqj0wdOgaRUtUJ49UtJbPTcAKZWd55uq HDCvvp6E+U0edYTCSbNh+7avC7SDHNpiyl/9kiEbDOzbJ/Rlg3faxKTwpYdwJMoP OIK80BRrEnj8ISFcVUivnjeRHpiIHLUAtpEN/R9dyvghO8IQ89UNXI7xVsneiuOf GC1HH6T8TBimBBvyY2Xbgavvn1Hh6iOOPJKgOiXmPjgCvVmEZiiEuHG0jo4MrdZt xFm7pX1QGA/Rd1rwbSXuHi4Vd7EzRJL2dFfFAjc/tqwMmeVrIo88h8Z+SKx91367 +FD4qHpWHtgtIVNUE8ER8nO6021952Xtl8GzaIvZS8RDQBjkAdZZ/LwhU9OplKGB QA8P+w4GkymUYW/hD3YI92Mq0Bo3JhADlH1dOtYB/tCQir82dBZzeBnrKg4gPJyW 64HSOdrQ8rlEsx8NfvzbZ7YAP9YCIg0CNh+VRoFe/jiAKcUSSY0tjwklOIA6d6ZG aqMftxA0iSlBTxJfjtS/JL/XZnXorHSZG3GKNyf3YPObTRDRHi5j+FtM7MIV5zuF UeVF+q0mzJbfux1csOv50RFemIchbruUlvnrkkoYgQN1trVVlBU= =fvSI -----END PGP SIGNATURE----- --FwcyyavetwXuQKZG--