From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8988342BF1 for ; Mon, 5 Jun 2023 18:12:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D717410EE; Mon, 5 Jun 2023 18:12:57 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 9B2A04003C; Mon, 5 Jun 2023 18:12:54 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 302305C00B6; Mon, 5 Jun 2023 12:12:54 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 05 Jun 2023 12:12:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1685981574; x=1686067974; bh=UELkaBXIwoFApmaT3lMNQpaaiHV72mHaZp5 78wBdBA4=; b=sIJdQNvSfG4a7uMK0UAvDAwpc39a7qDWOu54uC7oZAccRHLYfBw vir1tneEGrLHVZmMnLZyoEn1LyhegIxsPQxmn/gGVSJgDdmChUD8ssxk3cdCinCF LIbfC3m92bcN1D3sBaRsOGoM4mlN9Txyualp7yCOYso+z2YXNZVsRY+KipVIpSH0 ab/f506+4Iw9A2gEfd2Hw3/JhdcOJY8W+VtbhLYNvtDpg9m3LRxPYNMmYvv7ipv/ WSUMY/+HvcNwJZn2parWfdIgOcN3mSv/OFB9a0EdSVKC9jvat5kvynEERitUOZaR +5KlH7oP7EoZa+opT7kvn5WNJvOB8CG+5tQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1685981574; x=1686067974; bh=UELkaBXIwoFApmaT3lMNQpaaiHV72mHaZp5 78wBdBA4=; b=C/kDIk8hjIS+l5+ZSA1hw2P4T2bK7GuazvvYJDQXxdCgtl6EZq4 vu2ASpzFn/Q3LcGXfNYetYqQiHLI5OGnTn834IDWCxFf5TUr7kjiUpVWdj7sVkqw YdaP2vLObweGPRFvQ1YzBKqs8h2zBLCy+shtC5Yc3PbplRrcZ9m5R4B+v04vQOIm gENVOAKSuQ8r8gg2Ps/Yrm80BU0KjhhUDc+9UtCjqe+Ynhj0X7ca59By127joDT6 8oD0AlWlqHbOgrGWCrh0Hm+HcLw/f9ApRQCVP579idRvxqp9NgAnwuQEOIA5dUQs c4B0tPjp4uso+nwmBeRuWDB6LAOZfSkUSGA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeelledgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Jun 2023 12:12:52 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org, david.marchand@redhat.com, Tyler Retzlaff , dmitry.kozliuk@gmail.com, Tal Shnaiderman Subject: Re: [PATCH] eal: fix calling cleanup function twice Date: Mon, 05 Jun 2023 18:12:51 +0200 Message-ID: <16531816.0ZKypZ73Fx@thomas> In-Reply-To: <20230601160855.119801-1-bruce.richardson@intel.com> References: <20230601160855.119801-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 01/06/2023 18:08, Bruce Richardson: > If an app calls rte_eal_cleanup() inside it's own code, then cleanup > could be called a second time automatically when the app exits. While > mostly harmless, we can avoid any potential issues by guaranteeing that > cleanup only gets called once, in the same way that eal_init only ever > gets called once. > > Note: This patch only touches Linux and FreeBSD. Windows EAL does not > have run-once guard on the init function, so omitting it in the cleanup > function. > > Fixes: aec9c13c5257 ("eal: add function to release internal resources") > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson Applied, thanks. Please we should keep the same behavior in Linux, FreeBSD and Windows. Is there any volunteer to add run-once guards in init and cleanup for Windows EAL?