From: Cong Wang <xiyou.wangc...@gmail.com> 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+3dfdea57819073a04...@syzkaller.appspotmail.com> Cc: Simon Horman <ho...@verge.net.au> Cc: Julian Anastasov <j...@ssi.bg> Cc: Pablo Neira Ayuso <pa...@netfilter.org> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Acked-by: Julian Anastasov <j...@ssi.bg> Acked-by: Simon Horman <ho...@verge.net.au> Signed-off-by: Pablo Neira Ayuso <pa...@netfilter.org> --- net/netfilter/ipvs/ip_vs_lblcr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c index 9b6a6c9e9cfa..542c4949937a 100644 --- a/net/netfilter/ipvs/ip_vs_lblcr.c +++ b/net/netfilter/ipvs/ip_vs_lblcr.c @@ -535,6 +535,7 @@ static int ip_vs_lblcr_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.11.0