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 71CE2A04C3 for ; Mon, 28 Sep 2020 12:29:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE0ED1D718; Mon, 28 Sep 2020 12:29:56 +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 E9DBE1D6F4 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-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-360--Sg3aifKMluxq0BWJL9zVQ-1; Mon, 28 Sep 2020 06:29:49 -0400 X-MC-Unique: -Sg3aifKMluxq0BWJL9zVQ-1 Received: by mail-ua1-f70.google.com with SMTP id m17so84842uan.19 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=eoe5IPAmsU8Ga/9nC+q6mhOaYXsyLCx4/gxfju/GnQUFW5+YKlYZnsI2qrBtQ1qImj az9BEvOAa5dz3aaiwqRHg9xZFiQm4TQIWX/UkUYDKHMs5alKKo9ChbA5eslg/i+t9T8j QFGUcNDcjsRFYGfHSRHEvwJ5jBM0aR0W+EJJ+Q95Y4S3x1XKC6k+hx3iL9Hwj7hOYXnf fUk71qS5vIIouCrJ8go5Iv0a42SBbp6zRSpkCZEUjtcxjDW0Oi0aUOxZexReAtVYA5Bg 32i3aYlvgu2x3TVWUCYP/6uXw3UJgrJBa8uT0RBgvkg9PYD+QvjaxtFvulTxtNvkJKkI b5Cg== X-Gm-Message-State: AOAM530HmxUl14KPvBZlMDJSHgUpG/bav4dBgKybL1uwZzhkXiWPtqIX 8Q7EtsP+O4ICbwYnTiiKrmCX2+I3veu7HjIIYB0yQIpZ2hjHURxaPo+foUc11XpzOe7JEcx0mE2 tOOUitTO1Y61h2lJ7/OJCQA4= X-Received: by 2002:ab0:7313:: with SMTP id v19mr199525uao.87.1601288989322; 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-stable] [dpdk-dev] [PATCH] stack: fix possible uninitialized success variable 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" 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