From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by dpdk.org (Postfix) with ESMTP id 84C03ADBE for ; Mon, 26 May 2014 18:41:01 +0200 (CEST) Received: by mail-we0-f178.google.com with SMTP id u56so8123162wes.23 for ; Mon, 26 May 2014 09:41:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=STLYdmEL0Ik1/9FUpaJF9vpzEIDib3kI236DUe/lI6A=; b=fh/PkfRCGlA0hqLl9AVtOXSh/T1lkzfeH9wVy7SpXg4oZyLlsEz/B2eIWlesnVw3QO lGAjRnk5ocKJlJWKTCZA/XfBjICdzrdkrjVaOOu63wdHWngV2rZA+2rm/a2OzOFdgY6H g7wFj2kv4xBshMBnmMJbJV5AWT64ds9wpexRy6yC5g1lAamv1968bdr99TBZ6uZnx47x mzeRW/8uANPyAfBuatRpfXS87wqdxKwZY5s2AYERCHeynSapCaZYnPEglKRgqSX3S3KV /5tL7VPLCgt9cykZot0XP+XLB4mbISP/+ex3W7CphvR718kyUtzZW28JYzEBKsJ7EuE9 lh+g== X-Gm-Message-State: ALoCoQnJA2MNcJ8WWuWsCu/DshDoQ89ee8mgban2NKlFYvM4VGTiZqDTOwG79wkYjZnUalrfmafq X-Received: by 10.180.107.97 with SMTP id hb1mr29831634wib.20.1401122471935; Mon, 26 May 2014 09:41:11 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id je7sm1106303wic.14.2014.05.26.09.41.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 May 2014 09:41:11 -0700 (PDT) From: Thomas Monjalon To: Konstantin Ananyev Date: Mon, 26 May 2014 18:41:07 +0200 Message-ID: <1435991.TQ24Xc1T6G@xps13> Organization: 6WIND User-Agent: KMail/4.13 (Linux/3.14.4-1-ARCH; KDE/4.13.0; x86_64; ; ) In-Reply-To: <1400843331-24944-1-git-send-email-konstantin.ananyev@intel.com> References: <1400843331-24944-1-git-send-email-konstantin.ananyev@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] fix for 2 consecutive rte_eth_dev_start() can cause a SIGSEGV X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 16:41:01 -0000 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