[dpdk-dev] [PATCH] librte_eal: FreeBSD contigmem prevent possible buffer overrun during module unload.

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Thu Oct 16 21:32:42 CEST 2014



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Alan Carew
> Sent: Tuesday, October 14, 2014 1:19 PM
> To: dev at dpdk.org
> Subject: [dpdk-dev] [PATCH] librte_eal: FreeBSD contigmem prevent
> possible buffer overrun during module unload.
> 
> The maximum mount contiguous memory regions for FreeBSD is limited by
> RTE_CONTIGMEM_MAX_NUM_BUFS, a pointer to each region is stored in
> static void * contigmem_buffers[RTE_CONTIGMEM_MAX_NUM_BUFS]
> 
> A user can specify a greater amount via hw.contigmem.num_buffers,
> while the allocation logic will prevent this allocation from occuring the logic
> in contigmem_unload() will attempt to free hw.contigmem.num_buffers and
> an
> overrun occurs.
> 
> This patch limits the freeing to a maximum of
> RTE_CONTIGMEM_MAX_NUM_BUFS.
> 
> Signed-off-by: Alan Carew <alan.carew at intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>



More information about the dev mailing list