summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-02-18 14:43:32 -0800
committerFlorin Coras <florin.coras@gmail.com>2021-02-18 23:18:26 +0000
commit5c01dbc47ceca82fa93ca62fcda9a7904331d810 (patch)
tree216f3264cbd7bb830473474a4bdff99f1e62e3fa
parent0306fe6681e85f580d80ab968dbed267024fa1fc (diff)
svm: fix active fifo ll on attach
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idf44f8d54c97fc43da5d5760e5ce477af07e5fbf
-rw-r--r--src/svm/fifo_segment.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/svm/fifo_segment.c b/src/svm/fifo_segment.c
index 76cc046efec..02886bc7c8f 100644
--- a/src/svm/fifo_segment.c
+++ b/src/svm/fifo_segment.c
@@ -787,6 +787,9 @@ fs_fifo_free (fifo_segment_t *fs, svm_fifo_t *f)
u32 slice_index = f->shr->slice_index;
fifo_slice_private_t *pfss;
+ if (CLIB_DEBUG)
+ clib_memset (f, 0xfc, sizeof (*f));
+
pfss = &fs->slices[slice_index];
clib_mem_bulk_free (pfss->fifos, f);
}
@@ -976,6 +979,7 @@ fifo_segment_attach_fifo (fifo_segment_t *fs, svm_fifo_t **f, u32 slice_index)
fss = fsh_slice_get (fs->h, slice_index);
pfss = fs_slice_private_get (fs, slice_index);
fss->virtual_mem += svm_fifo_size (nf);
+ nf->next = nf->prev = 0;
if (nf->flags & SVM_FIFO_F_LL_TRACKED)
pfss_fifo_add_active_list (pfss, nf);