ipvs: initialize tbl->entries in ip_vs_lblc_init_svc()
Subsystems (4)
PATCH 1/1 ipvs: initialize tbl->entries in ip_vs_lblc_init_svc()
Similarly, tbl->entries is not initialized after kmalloc(), therefore causes an uninit-value warning in ip_vs_lblc_check_expire(), as reported by syzbot.
--- net/netfilter/ipvs/ip_vs_lblc.c | 1 + 1 file changed, 1 insertion(+)
net/netfilter/ipvs/ip_vs_lblc.c +1 -0
@@ -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
Signature · 1 line
2.13.0
Hello,
Quoted 9 lines · Cong Wang
Similarly,
tbl->entriesis not initialized afterkmalloc(), therefore causes an uninit-value warning inip_vs_lblc_check_expire(), as reported by syzbot.Reported-by <[email protected]>Cc Simon Horman <[email protected]>Cc Julian Anastasov <[email protected]>Cc Pablo Neira Ayuso <[email protected]>Signed-off-by Cong Wang <[email protected]>
Thanks!
Quoted 18 lines
--- net/netfilter/ipvs/ip_vs_lblc.c | 1 + 1 file changed, 1 insertion(+)net/netfilter/ipvs/ip_vs_lblc.c +1
-0@@ -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 Signature · 1 line
2.13.0
Regards
Quoted 15 lines · Julian Anastasov
Hello,
Quoted 9 lines · Cong Wang
Similarly,
tbl->entriesis not initialized afterkmalloc(), therefore causes an uninit-value warning inip_vs_lblc_check_expire(), as reported by syzbot.Reported-by <[email protected]>Cc Simon Horman <[email protected]>Cc Julian Anastasov <[email protected]>Cc Pablo Neira Ayuso <[email protected]>Signed-off-by Cong Wang <[email protected]>
Quoted 3 lines
Thanks!
Acked-by Julian Anastasov <[email protected]>
Thanks.
Pablo, could you take this into nf?
Quoted 25 lines
Quoted 19 lines
--- net/netfilter/ipvs/ip_vs_lblc.c | 1 + 1 file changed, 1 insertion(+)net/netfilter/ipvs/ip_vs_lblc.c +1
-0@@ -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 Signature · 1 line
2.13.0Regards
--
Julian Anastasov <[email protected]>
Pablo Neira Ayuso
maintainerQuoted 18 lines · Simon Horman
Quoted 17 lines · Julian Anastasov
Hello,
Quoted 9 lines · Cong Wang
Similarly,
tbl->entriesis not initialized afterkmalloc(), therefore causes an uninit-value warning inip_vs_lblc_check_expire(), as reported by syzbot.Reported-by <[email protected]>Cc Simon Horman <[email protected]>Cc Julian Anastasov <[email protected]>Cc Pablo Neira Ayuso <[email protected]>Signed-off-by Cong Wang <[email protected]>Thanks!
Quoted 7 lines
Quoted 1 line
Acked-by Julian Anastasov <[email protected]>Thanks.
Pablo, could you take this into nf?
Acked-by Simon Horman <[email protected]>
Done, thanks.