* [dpdk-stable] [PATCH] fbarray: fix fbarray destruction
@ 2019-07-09 14:00 Anatoly Burakov
2019-07-10 21:26 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Anatoly Burakov @ 2019-07-09 14:00 UTC (permalink / raw)
To: dev; +Cc: patrick.fu, stable
Currently, when fbarray is destroyed, the fbarray structure is not
zeroed out, which leads to stale data being there and confusing
secondary process init in legacy mem mode. Fix it by always
memsetting the fbarray to zero when destroying it.
Fixes: 5b61c62cfd76 ("fbarray: add internal tailq for mapped areas")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/common/eal_common_fbarray.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c
index b7ddb66e9..1312f936b 100644
--- a/lib/librte_eal/common/eal_common_fbarray.c
+++ b/lib/librte_eal/common/eal_common_fbarray.c
@@ -1055,6 +1055,9 @@ rte_fbarray_destroy(struct rte_fbarray *arr)
TAILQ_REMOVE(&mem_area_tailq, tmp, next);
free(tmp);
ret = 0;
+
+ /* reset the fbarray structure */
+ memset(arr, 0, sizeof(*arr));
out:
rte_spinlock_unlock(&mem_area_lock);
return ret;
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] fbarray: fix fbarray destruction
2019-07-09 14:00 [dpdk-stable] [PATCH] fbarray: fix fbarray destruction Anatoly Burakov
@ 2019-07-10 21:26 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2019-07-10 21:26 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dev, patrick.fu, stable
09/07/2019 16:00, Anatoly Burakov:
> Currently, when fbarray is destroyed, the fbarray structure is not
> zeroed out, which leads to stale data being there and confusing
> secondary process init in legacy mem mode. Fix it by always
> memsetting the fbarray to zero when destroying it.
>
> Fixes: 5b61c62cfd76 ("fbarray: add internal tailq for mapped areas")
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-10 21:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-09 14:00 [dpdk-stable] [PATCH] fbarray: fix fbarray destruction Anatoly Burakov
2019-07-10 21:26 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).