patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [dpdk-dev] [PATCH] stack: fix possible uninitialized success variable
@ 2020-09-25  5:00 wangyunjian
  2020-09-28 10:29 ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: wangyunjian @ 2020-09-25  5:00 UTC (permalink / raw)
  To: dev
  Cc: gage.eads, olivier.matz, jerry.lilijun, xudingke, Yunjian Wang, stable

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] stack: fix possible uninitialized success variable
  2020-09-25  5:00 [dpdk-stable] [dpdk-dev] [PATCH] stack: fix possible uninitialized success variable wangyunjian
@ 2020-09-28 10:29 ` David Marchand
  2020-09-30 19:15   ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2020-09-28 10:29 UTC (permalink / raw)
  To: wangyunjian
  Cc: dev, Gage Eads, Olivier Matz, Lilijun (Jerry), xudingke, dpdk stable

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] stack: fix possible uninitialized success variable
  2020-09-28 10:29 ` David Marchand
@ 2020-09-30 19:15   ` David Marchand
  0 siblings, 0 replies; 3+ messages in thread
From: David Marchand @ 2020-09-30 19:15 UTC (permalink / raw)
  To: wangyunjian
  Cc: dev, Gage Eads, Olivier Matz, Lilijun (Jerry), xudingke, dpdk stable

On Mon, Sep 28, 2020 at 12:29 PM David Marchand
<david.marchand@redhat.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>
> Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-30 19:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25  5:00 [dpdk-stable] [dpdk-dev] [PATCH] stack: fix possible uninitialized success variable wangyunjian
2020-09-28 10:29 ` David Marchand
2020-09-30 19:15   ` David Marchand

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