Skip to content

Commit 3aa1409

Browse files
congwangummakynes
authored andcommitted
ipvs: initialize tbl->entries after allocation
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 146cd6b commit 3aa1409

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/netfilter/ipvs/ip_vs_lblcr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ static int ip_vs_lblcr_init_svc(struct ip_vs_service *svc)
535535
tbl->counter = 1;
536536
tbl->dead = false;
537537
tbl->svc = svc;
538+
atomic_set(&tbl->entries, 0);
538539

539540
/*
540541
* Hook periodic timer for garbage collection

0 commit comments

Comments
 (0)