[PATCH] eal: fix calling cleanup function twice

Thomas Monjalon thomas at monjalon.net
Mon Jun 5 18:12:51 CEST 2023


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 at dpdk.org
> 
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>

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?





More information about the dev mailing list