* [Patch nf] ipvs: initialize tbl->entries in ip_vs_lblc_init_svc()
@ 2018-04-23 21:04 Cong Wang
2018-04-24 5:17 ` Julian Anastasov
0 siblings, 1 reply; 4+ messages in thread
From: Cong Wang @ 2018-04-23 21:04 UTC (permalink / raw)
To: netdev
Cc: lvs-devel, netfilter-devel, Cong Wang, Simon Horman,
Julian Anastasov, Pablo Neira Ayuso
Similarly, tbl->entries is not initialized after kmalloc(),
therefore causes an uninit-value warning in ip_vs_lblc_check_expire(),
as reported by syzbot.
Reported-by: <syzbot+3e9695f147fb529aa9bc@syzkaller.appspotmail.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Julian Anastasov <ja@ssi.bg>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
net/netfilter/ipvs/ip_vs_lblc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
index 3057e453bf31..83918119ceb8 100644
--- a/net/netfilter/ipvs/ip_vs_lblc.c
+++ b/net/netfilter/ipvs/ip_vs_lblc.c
@@ -371,6 +371,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
tbl->counter = 1;
tbl->dead = false;
tbl->svc = svc;
+ atomic_set(&tbl->entries, 0);
/*
* Hook periodic timer for garbage collection
--
2.13.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Patch nf] ipvs: initialize tbl->entries in ip_vs_lblc_init_svc()
2018-04-23 21:04 [Patch nf] ipvs: initialize tbl->entries in ip_vs_lblc_init_svc() Cong Wang
@ 2018-04-24 5:17 ` Julian Anastasov
2018-04-26 12:14 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: Julian Anastasov @ 2018-04-24 5:17 UTC (permalink / raw)
To: Cong Wang
Cc: netdev, lvs-devel, netfilter-devel, Simon Horman, Pablo Neira Ayuso
Hello,
On Mon, 23 Apr 2018, Cong Wang wrote:
> Similarly, tbl->entries is not initialized after kmalloc(),
> therefore causes an uninit-value warning in ip_vs_lblc_check_expire(),
> as reported by syzbot.
>
> Reported-by: <syzbot+3e9695f147fb529aa9bc@syzkaller.appspotmail.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Julian Anastasov <ja@ssi.bg>
> Cc: Pablo Neira Ayuso <pablo@netfilter.org>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Thanks!
Acked-by: Julian Anastasov <ja@ssi.bg>
> ---
> net/netfilter/ipvs/ip_vs_lblc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
> index 3057e453bf31..83918119ceb8 100644
> --- a/net/netfilter/ipvs/ip_vs_lblc.c
> +++ b/net/netfilter/ipvs/ip_vs_lblc.c
> @@ -371,6 +371,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
> tbl->counter = 1;
> tbl->dead = false;
> tbl->svc = svc;
> + atomic_set(&tbl->entries, 0);
>
> /*
> * Hook periodic timer for garbage collection
> --
> 2.13.0
Regards
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch nf] ipvs: initialize tbl->entries in ip_vs_lblc_init_svc()
2018-04-24 5:17 ` Julian Anastasov
@ 2018-04-26 12:14 ` Simon Horman
2018-04-26 22:21 ` Pablo Neira Ayuso
0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2018-04-26 12:14 UTC (permalink / raw)
To: Julian Anastasov
Cc: Cong Wang, netdev, lvs-devel, netfilter-devel, Pablo Neira Ayuso
On Tue, Apr 24, 2018 at 08:17:06AM +0300, Julian Anastasov wrote:
>
> Hello,
>
> On Mon, 23 Apr 2018, Cong Wang wrote:
>
> > Similarly, tbl->entries is not initialized after kmalloc(),
> > therefore causes an uninit-value warning in ip_vs_lblc_check_expire(),
> > as reported by syzbot.
> >
> > Reported-by: <syzbot+3e9695f147fb529aa9bc@syzkaller.appspotmail.com>
> > Cc: Simon Horman <horms@verge.net.au>
> > Cc: Julian Anastasov <ja@ssi.bg>
> > Cc: Pablo Neira Ayuso <pablo@netfilter.org>
> > Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
>
> Thanks!
>
> Acked-by: Julian Anastasov <ja@ssi.bg>
Thanks.
Pablo, could you take this into nf?
Acked-by: Simon Horman <horms@verge.net.au>
>
> > ---
> > net/netfilter/ipvs/ip_vs_lblc.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
> > index 3057e453bf31..83918119ceb8 100644
> > --- a/net/netfilter/ipvs/ip_vs_lblc.c
> > +++ b/net/netfilter/ipvs/ip_vs_lblc.c
> > @@ -371,6 +371,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
> > tbl->counter = 1;
> > tbl->dead = false;
> > tbl->svc = svc;
> > + atomic_set(&tbl->entries, 0);
> >
> > /*
> > * Hook periodic timer for garbage collection
> > --
> > 2.13.0
>
> Regards
>
> --
> Julian Anastasov <ja@ssi.bg>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch nf] ipvs: initialize tbl->entries in ip_vs_lblc_init_svc()
2018-04-26 12:14 ` Simon Horman
@ 2018-04-26 22:21 ` Pablo Neira Ayuso
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2018-04-26 22:21 UTC (permalink / raw)
To: Simon Horman
Cc: Julian Anastasov, Cong Wang, netdev, lvs-devel, netfilter-devel
On Thu, Apr 26, 2018 at 02:14:36PM +0200, Simon Horman wrote:
> On Tue, Apr 24, 2018 at 08:17:06AM +0300, Julian Anastasov wrote:
> >
> > Hello,
> >
> > On Mon, 23 Apr 2018, Cong Wang wrote:
> >
> > > Similarly, tbl->entries is not initialized after kmalloc(),
> > > therefore causes an uninit-value warning in ip_vs_lblc_check_expire(),
> > > as reported by syzbot.
> > >
> > > Reported-by: <syzbot+3e9695f147fb529aa9bc@syzkaller.appspotmail.com>
> > > Cc: Simon Horman <horms@verge.net.au>
> > > Cc: Julian Anastasov <ja@ssi.bg>
> > > Cc: Pablo Neira Ayuso <pablo@netfilter.org>
> > > Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> >
> > Thanks!
> >
> > Acked-by: Julian Anastasov <ja@ssi.bg>
>
> Thanks.
>
> Pablo, could you take this into nf?
>
> Acked-by: Simon Horman <horms@verge.net.au>
Done, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-04-26 22:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 21:04 [Patch nf] ipvs: initialize tbl->entries in ip_vs_lblc_init_svc() Cong Wang
2018-04-24 5:17 ` Julian Anastasov
2018-04-26 12:14 ` Simon Horman
2018-04-26 22:21 ` Pablo Neira Ayuso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.