Skip to content

Commit 8b2ebb6

Browse files
congwangummakynes
authored andcommitted
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. 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]> Acked-by: Julian Anastasov <[email protected]> Acked-by: Simon Horman <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 3aa1409 commit 8b2ebb6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/netfilter/ipvs/ip_vs_lblc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
372372
tbl->counter = 1;
373373
tbl->dead = false;
374374
tbl->svc = svc;
375+
atomic_set(&tbl->entries, 0);
375376

376377
/*
377378
* Hook periodic timer for garbage collection

0 commit comments

Comments
 (0)