From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] fix for 2 consecutive rte_eth_dev_start() can cause a SIGSEGV Date: Mon, 26 May 2014 18:41:07 +0200 Message-ID: <1435991.TQ24Xc1T6G@xps13> References: <1400843331-24944-1-git-send-email-konstantin.ananyev@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Konstantin Ananyev Return-path: In-Reply-To: <1400843331-24944-1-git-send-email-konstantin.ananyev-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 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" 2014-05-23 12:08, Konstantin Ananyev: > 1)If igb_alloc_rx_queue_mbufs() would fail to allocate an mbuf for RX queue, > it calls igb_rx_queue_release(rxq). > That causes rxq to be silently freed, without updating > dev->data->rx_queues[]. So any firther reference to it will trigger the > SIGSEGV. > Same thing in em PMD too. > To fix: igb_alloc_rx_queue_mbufs() should just return an error to the caller > and let upper layer to deal with the probem. > That's what ixgbe PMD doing right now. > 2)In tx_queue_setup (for all 3 PMDs: ixgbe, igb, em) we call > tx_queue_release(dev->data->tx_queues[queue_idx]) > without setting dev->data->tx_queues[queue_idx] = NULL > afterwards. > 3)Prevent rte_eth_dev_start/stop to call underneath dev_start/dev_stop > for already started/stopped device. > 4) fix compiler warning on PMD_DEBUG_TRACE() formats. Please, only 1 fix per patch. This way, we'll hopefully have a nice title for each fix. It's simpler for changelog. Thanks -- Thomas