From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] librte_eal: FreeBSD contigmem prevent possible buffer overrun during module unload. Date: Mon, 20 Oct 2014 23:48:01 +0200 Message-ID: <3008758.TcMj3bSWGZ@xps13> References: <1413289116-4825-1-git-send-email-alan.carew@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: "Carew, Alan" Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" > > 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 > > Acked-by: Pablo de Lara Applied Thanks -- Thomas