[PATCH v2] app/dma-perf: fix lcores array out of bounds access

Thomas Monjalon thomas at monjalon.net
Tue Nov 14 15:37:49 CET 2023


26/10/2023 11:53, Mingjin Ye:
> The default size of the lcores array in the lcore dma map
> is MAX_WORKER_NB. However, when parsing configuration
> parameters, MAX_LCORE_NB is used as a constraint.
> Since MAX_LCORE_NB is greater than MAX_WORKER_NB, this
> causes array access to go out of bounds when the value
> of the `lcore_dma/lcore` configuration item in the
> parameter file is greater than MAX_WORKER_NB.
> 
> This patch fixes the issue by removing the MAX_LCORE_NB
> macro and using MAX_WORKER_NB consistently.
> 
> Fixes: 623dc9364dc6 ("app/dma-perf: introduce DMA performance test")
> 
> Signed-off-by: Mingjin Ye <mingjinx.ye at intel.com>

Applied, thanks.





More information about the dev mailing list