From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C2E81A0679 for ; Fri, 5 Apr 2019 16:08:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8BBAD1B50C; Fri, 5 Apr 2019 16:08:13 +0200 (CEST) Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by dpdk.org (Postfix) with ESMTP id 715901B50C; Fri, 5 Apr 2019 16:08:12 +0200 (CEST) Received: by mail-ed1-f65.google.com with SMTP id h22so5633733edw.7; Fri, 05 Apr 2019 07:08:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z1hP7EN7vz4slzY8mDIQcU4HB2knxO4odNGFLPpQpNM=; b=sJDwaF6vXHGtNOuQlCe/U27R9JRYcSBcc4wvSCQSNkJotqP8lwv3QVIGwaf0XZae6/ chfVVpTpGgLel+UfDvuM8fInQEVA89WiH9EgHefXGadfOdLZQdkjadPSxe3+4nrhhPYA e+d/jsvB0EaXZHyFtRH5lhCVLrVWYdS+L75CS1cE30CcFbirsxg0jJynp2nmzoN30+/D DaVeYWnAKsplcs+kUOm0ZTkH4kyxfIt6ej2QrDOBFUZVeM3qIhz06yuUjNsIX3g6SX/C Lhfr5Kb8IP09X690vKEPDzM+oCPA1356UoNAJlrwzH7g1QE0mse0enHTk/O4MHhZEPJb Lt1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z1hP7EN7vz4slzY8mDIQcU4HB2knxO4odNGFLPpQpNM=; b=J25/mNL0d71xOR14W+TeHoM7DYykcsz+MxXwLjv7yvFuo6YGs4pa/MDWJu8mFvtqs9 WNM1DuqLGEAZPgYdEhv6yTTqQGWoIN/5eAVXbDGFKgd90qapzYTU770mV/2PlCnuf/Qx +XxwQk9x6xm7WCuWTv3iAEy5uzicLPTRQrTHj/uLfwPjLmbv0Xax17GJTrUoqJMnw+Wn Nc8knjNhDmL6eop42WJUyO2FT23Y9u8nZOzFGUbxoIOkJdPEKB5jefz9f1q4xQR0ennv q7f0WNkRTbjrJIq8aV3S7H/xWTIrh5nbjrNveq/gJIrOWXdsBx/PRH3uoEKGSqw6uiBJ k7qA== X-Gm-Message-State: APjAAAVPH1BrZKQtOD1iKS4ne1PU6evpEE+voFg1AYvfa3o93h1YhFKN 2X4AhqsdXww+t1+wHnyQA+UZLDRoQlkTs2vmkTY= X-Google-Smtp-Source: APXvYqzS65bBTBTBivhFF6Fl4hpj1g9ogoYl4dV2zIC1jWvlbHzLBrXS/VaakCa6RjFL9GG8LlIqxOi4mePM5sstV9k= X-Received: by 2002:a50:ba52:: with SMTP id 18mr8147846eds.243.1554473292041; Fri, 05 Apr 2019 07:08:12 -0700 (PDT) MIME-Version: 1.0 References: <20190405134511.49066-1-bruce.richardson@intel.com> <20190405134511.49066-4-bruce.richardson@intel.com> In-Reply-To: <20190405134511.49066-4-bruce.richardson@intel.com> From: Rami Rosen Date: Fri, 5 Apr 2019 17:08:01 +0300 Message-ID: To: Bruce Richardson Cc: dev , qi.z.zhang@intel.com, stable@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 3/5] net/i40e: fix dereference before NULL check in mbuf release X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Acked-By: Rami Rosen In this occasion I noticed that there is a typo in the code that appears in the patch; it should be "Pointer to txq" instead of "Pointer to rxq": I would consider resending and fixing it on this occasion: > if (!txq || !txq->sw_ring) { > PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL"); > return; > } =E2=80=8F: > Coverity flags that the txq variable is used before it's checked for NULL= . > > Coverity issue: 195023 > > Fixes: 24853544c84c ("net/i40e: fix mbuf free in vector Tx") > Cc: qi.z.zhang@intel.com > CC: stable@dpdk.org > > Signed-off-by: Bruce Richardson > --- > drivers/net/i40e/i40e_rxtx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c > index 8f727fae6..5ce85eb52 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -2423,13 +2423,13 @@ i40e_tx_queue_release_mbufs(struct i40e_tx_queue > *txq) > struct rte_eth_dev *dev; > uint16_t i; > > - dev =3D &rte_eth_devices[txq->port_id]; > - > if (!txq || !txq->sw_ring) { > PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL"); > return; > } > > + dev =3D &rte_eth_devices[txq->port_id]; > + > /** > * vPMD tx will not set sw_ring's mbuf to NULL after free, > * so need to free remains more carefully. > -- > 2.20.1 > >