vlib: fix vlib_buffer_free_inline() AVX-512 overflow 63/40663/2
authorBenoît Ganne <bganne@cisco.com>
Mon, 8 Apr 2024 14:49:06 +0000 (16:49 +0200)
committerDamjan Marion <dmarion@0xa5.net>
Wed, 10 Apr 2024 14:04:51 +0000 (14:04 +0000)
'queue' is declared on the stack and must be big enough to handle
queue_size + max processed elements per loops.
When AVX-512 was added, this additional max was not increased from 4 to
8 accordingly.

Type: fix
Fixes: 767a9ab4b1

Change-Id: I15f2f930fc316f92da2e4642f41852d856c06a48
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/vlib/buffer_funcs.h

index b3861a2..010289c 100644 (file)
@@ -777,7 +777,7 @@ vlib_buffer_free_inline (vlib_main_t * vm, u32 * buffers, u32 n_buffers,
   const int queue_size = 128;
   vlib_buffer_pool_t *bp = 0;
   u8 buffer_pool_index = ~0;
-  u32 n_queue = 0, queue[queue_size + 4];
+  u32 n_queue = 0, queue[queue_size + 8];
   vlib_buffer_template_t bt = {};
 #if defined(CLIB_HAVE_VEC128)
   vlib_buffer_t bpi_mask = {.buffer_pool_index = ~0 };