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=202606 header.b=kZPFrex6; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 0B64A5A061A for ; Thu, 09 Jul 2026 04:42:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202606; t=1783564947; bh=gsIb7V8A//u3Zjcb9QLvxxmHyFf0aCoQmo77rYR8zfs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kZPFrex6uWSOGNovKzOKfTY/e1OD67itFHB1I9awH5h9s4vydG/WarSECGF8Dil+A 9YPnxrYu9Znulk6ppuHtmwZQZdq3NME9buWeu0htpPZLYasul8hifc+RIRB11rbUuX KX4A6t7ocE5r7qLieO3UF75VxtYwAeeyegMCKm6OPUjSXtYnE+QMAu482oHRC5jsfe C20UH/eUQPRWsaVEde0ua3SZYFfo9DFs+TXEGzotFrrzFhXlAhvYu+c4tImx2PuHXL t7A0FsKcP99PnzAhktzlXLVqv/cFyurARa6Y6n3TFFeDOW8sil8sdGhXhYZ4ZZ+du0 VEtY7eNMF5aew== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gwfPv0hGdz58cd; Thu, 09 Jul 2026 12:42:27 +1000 (AEST) Date: Thu, 9 Jul 2026 12:41:54 +1000 From: David Gibson To: Jon Maloy Subject: Re: [PATCH 7/7] doc/platform-requirements: Close leaked sockets in test_close_dup() Message-ID: References: <20260708223203.885345-1-jmaloy@redhat.com> <20260708223203.885345-8-jmaloy@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xKGPnRR8fzHu52+6" Content-Disposition: inline In-Reply-To: <20260708223203.885345-8-jmaloy@redhat.com> Message-ID-Hash: V3CVZCMPOAU6MGNCRWXDBQXJN4TFJN2P X-Message-ID-Hash: V3CVZCMPOAU6MGNCRWXDBQXJN4TFJN2P 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: sbrivio@redhat.com, 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: --xKGPnRR8fzHu52+6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 08, 2026 at 06:32:03PM -0400, Jon Maloy wrote: > s1 and send_s were not closed before returning, leaking file > descriptors across the loop iterations in main(). >=20 > Signed-off-by: Jon Maloy Insignificant as a bug, since the whole program is over in milliseconds. But might as well make the checkers happy. Reviewed-by: David Gibson > --- > doc/platform-requirements/udp-close-dup.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/doc/platform-requirements/udp-close-dup.c b/doc/platform-req= uirements/udp-close-dup.c > index 99060fcb..abb719a5 100644 > --- a/doc/platform-requirements/udp-close-dup.c > +++ b/doc/platform-requirements/udp-close-dup.c > @@ -87,6 +87,9 @@ static void test_close_dup(enum dup_method method) > token =3D random(); > send_token(send_s, token); > recv_token(s1, token); > + > + close(s1); > + close(send_s); > } > =20 > int main(int argc, char *argv[]) > --=20 > 2.52.0 >=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 --xKGPnRR8fzHu52+6 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmpPCnEACgkQzQJF27ox 2GcrLA/8D7wWTj/njVUsNqxOohSPmoAFWjzlFoSQf+cQIMT6Lmf2nyEAovHNDm7i 3DZdaMUws51QydDxd173L2Bx0yPPGK0dBSM52pGpaVCSOYSWnJu/20u8h2zG5z/+ XcmPQI+bYoYmrcrQRbNhyvBy9KAUNJpCUMtlOsjJHrl4QhGeaSKBw2lFA9SXm/7G 5UC6Z/oOqE7LEvL4P5+ZtQHsQBIN6MUSPsw2XyO6uLfVqFKvSjhoTDzVO6Qt1yoM j0qE4udvttnO/YHW9siLWG0nqcWLf9E0mJbrgJOFhMlx8y5bV0HRpkKJpShcQVPc tDON4SpwsI85jMk/OlmdZQ9W9tXZf+/ug7DxEwZ8u+FuEvvLQ3Jvabjra4iBm9ly TDlb2iCtw4r1Qa1hZPTlkPj2hm7NdGH/f98FscGnhyJ2TfPjXvB+5GX4MTt+oNk5 vZuhNiH+w2+sPpwm4/p/tMqcQ/4KYDIa1Mp2XBuyseeuJoZk7tuUb9huDPV7/rWQ TpOmRQXkD96QQbhCnnipLdSxVLaWzSLUYrSZnOd5+qT6AoW5Mpza9+3bgp4REaiL HBpHybtGB9fEZYw5eRacsx75tbOHi/KZ7g4SHxpexXekwL0BiAV5PZE8QojwLiRV VLzlQETXyMnKjl6JYyzTsF1gPVc6xs6tckwT6zjZkjXyqFDDf0Y= =4bJ+ -----END PGP SIGNATURE----- --xKGPnRR8fzHu52+6--