DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: wangyunjian <wangyunjian@huawei.com>
Cc: dev <dev@dpdk.org>, Gage Eads <gage.eads@intel.com>,
	 Olivier Matz <olivier.matz@6wind.com>,
	"Lilijun (Jerry)" <jerry.lilijun@huawei.com>,
	 xudingke <xudingke@huawei.com>, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] stack: fix possible uninitialized success variable
Date: Mon, 28 Sep 2020 12:29:38 +0200	[thread overview]
Message-ID: <CAJFAV8xbPNwO8qRHdb832mNPDp-3ri90=rqpBGf_gYc35_ZztA@mail.gmail.com> (raw)
In-Reply-To: <389c3874a5bc2db3056b222ec48c860b96f7ad67.1601009974.git.wangyunjian@huawei.com>

On Fri, Sep 25, 2020 at 7:02 AM wangyunjian <wangyunjian@huawei.com> wrote:
>
> From: Yunjian Wang <wangyunjian@huawei.com>
>
> This patch fixes an issue that uninitialized 'success'
> is used to be compared with '0'.
>
> Coverity issue: 337676
> Fixes: 3340202f5954 ("stack: add lock-free implementation")
> Cc: stable@dpdk.org
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
>  lib/librte_stack/rte_stack_lf_generic.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_stack/rte_stack_lf_generic.h b/lib/librte_stack/rte_stack_lf_generic.h
> index 3abbb5342..4850a05ee 100644
> --- a/lib/librte_stack/rte_stack_lf_generic.h
> +++ b/lib/librte_stack/rte_stack_lf_generic.h
> @@ -78,7 +78,7 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
>                          struct rte_stack_lf_elem **last)
>  {
>         struct rte_stack_lf_head old_head;
> -       int success;
> +       int success = 0;
>
>         /* Reserve num elements, if available */
>         while (1) {
> --
> 2.23.0
>

Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


  reply	other threads:[~2020-09-28 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25  5:00 [dpdk-dev] " wangyunjian
2020-09-28 10:29 ` David Marchand [this message]
2020-09-30 19:15   ` [dpdk-dev] [dpdk-stable] " David Marchand

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='CAJFAV8xbPNwO8qRHdb832mNPDp-3ri90=rqpBGf_gYc35_ZztA@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=jerry.lilijun@huawei.com \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    --cc=wangyunjian@huawei.com \
    --cc=xudingke@huawei.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).