DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] fix for 2 consecutive rte_eth_dev_start() can cause a SIGSEGV
Date: Wed, 28 May 2014 09:28:48 +0000	[thread overview]
Message-ID: <2601191342CEEE43887BDE71AB9772580EFB3547@IRSMSX105.ger.corp.intel.com> (raw)
In-Reply-To: <1435991.TQ24Xc1T6G@xps13>

Hi Thomas,

>> 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.

It is all fix for the same problem (except #4 of course).
I just put 1,2,3 to make it clear from what sub-parts fix consists.

Konstantin 

      reply	other threads:[~2014-05-28  9:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23 11:08 Konstantin Ananyev
2014-05-26 16:41 ` Thomas Monjalon
2014-05-28  9:28   ` Ananyev, Konstantin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2601191342CEEE43887BDE71AB9772580EFB3547@IRSMSX105.ger.corp.intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).