[dpdk-dev] [PATCH 2/2] timer: fix resource leak in finalize
Carrillo, Erik G
erik.g.carrillo at intel.com
Thu Jun 27 20:48:05 CEST 2019
> -----Original Message-----
> From: Burakov, Anatoly
> Sent: Tuesday, June 25, 2019 11:12 AM
> To: dev at dpdk.org
> Cc: Robert Sanford <rsanford at akamai.com>; Carrillo, Erik G
> <erik.g.carrillo at intel.com>
> Subject: [PATCH 2/2] timer: fix resource leak in finalize
> Currently, whenever timer library is initialized, the memory is leaked because
> there is no telling when primary or secondary processes get to use the state,
> and there is no way to initialize/deinitialize timer library state without race
> conditions because the data itself must live in shared memory.
> However, there is now a timer library lock in the shared memory config,
> which can be used to synchronize access to the timer library shared memory.
> Use it to initialize/deinitialize timer library shared data in a safe way. There is
> still a way to leak the memory (by killing one of the processes), but we can't
> do anything about that.
> Also, update the API doc. Note that the behavior of the API itself did not
> change - the requirement to call init in every process was simply not
> documented explicitly.
> Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo at intel.com>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo at intel.com>
More information about the dev