From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 45E57A04C3; Mon, 28 Sep 2020 12:29:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1318A1D6FE; Mon, 28 Sep 2020 12:29:55 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id D57E61D6F4 for ; Mon, 28 Sep 2020 12:29:52 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601288991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mgP4WF9/CQYLO3sQgYPzSnd6TjAIyUqXKg65Ev7iyqg=; b=ShbtD/g9FK3ThJz+DyVAfLMw1LSi8lEfkJ5odsgipTvNT9nxIXOCqKEVd/1lSGjkw2wzfv PvsI3NIR6DKsHOs/Pc3veG6JaSCpUlqJk7E0dWDzu1O6dq0MMZiWpYLUGRUi+Kv3zik2p+ twybGzzw9ukjeJLP51/lAyovvsZk0dk= Received: from mail-ua1-f71.google.com (mail-ua1-f71.google.com [209.85.222.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-348-cw-6JBjPObO1ZuHNox-cyA-1; Mon, 28 Sep 2020 06:29:49 -0400 X-MC-Unique: cw-6JBjPObO1ZuHNox-cyA-1 Received: by mail-ua1-f71.google.com with SMTP id x14so84897uan.12 for ; Mon, 28 Sep 2020 03:29:49 -0700 (PDT) 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=mgP4WF9/CQYLO3sQgYPzSnd6TjAIyUqXKg65Ev7iyqg=; b=j5aizHCmkq0oJdXv6JA/vM6LR0yQkQ5Mz1qAQJj+8liWsjpVEJJAtsfwDGkDa8jJ4n tXzDvPDmrOmdjo265la8kkOb68u5cffBmspb1yEsuq4YAeYwvXzitZsqnbbDsUjlOJXP jnp+Z6WvblCexbKcNkZFlyaLFyFI3N8lm+fN+fpgLFYHKmHUXFT02MraXwuj6hcjgik0 m7JYYzt5z0/ePfA+QMka2ZrKkrSMypITRCllk4l42JyBRDwzLKdwnwXw+BhD/TW8TOsi qY7K4vRNnxPd9CFRRxBIn0JoiLkOfr/V4nHefVgxWEva0wFBLdgTsqHgAVDrzYGbsvrV f2Jg== X-Gm-Message-State: AOAM531LiugwvoTP5gaTCcVZhbu/WgeEXEe2uFJKmLOg0irlqNFxSvdf fk1O4Cua+cZTDHgSzf2EPJfN0IFlU4X8uUiKrnhJEubdNr8jPpPiWmvaKnyq/yM/n+ygUhOdmWf 72jnNmfV5/Vjdnxt6Ve4= X-Received: by 2002:ab0:7313:: with SMTP id v19mr199527uao.87.1601288989323; Mon, 28 Sep 2020 03:29:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOTmjtlaIf6LWVKnaBazZjOHPNSczzMTcQIcsCUI4dVSHE/e/BFQSho88ZvqxdA+hbiyaVYaakv99ZQKCSl5w= X-Received: by 2002:ab0:7313:: with SMTP id v19mr199514uao.87.1601288989095; Mon, 28 Sep 2020 03:29:49 -0700 (PDT) MIME-Version: 1.0 References: <389c3874a5bc2db3056b222ec48c860b96f7ad67.1601009974.git.wangyunjian@huawei.com> In-Reply-To: <389c3874a5bc2db3056b222ec48c860b96f7ad67.1601009974.git.wangyunjian@huawei.com> From: David Marchand Date: Mon, 28 Sep 2020 12:29:38 +0200 Message-ID: To: wangyunjian Cc: dev , Gage Eads , Olivier Matz , "Lilijun (Jerry)" , xudingke , dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] stack: fix possible uninitialized success variable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Sep 25, 2020 at 7:02 AM wangyunjian wrote: > > From: Yunjian Wang > > 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 > --- > 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