diff options
author | Cong Wang <[email protected]> | 2018-04-23 14:04:45 -0700 |
---|---|---|
committer | Pablo Neira Ayuso <[email protected]> | 2018-04-27 00:20:33 +0200 |
commit | 8b2ebb6cf064247d60cccbf1750610ac9bb2e672 (patch) | |
tree | c615645978ac87b2305a92b82d52475dbd89b35e | |
parent | 3aa1409a7b160f9444945c0df1cb079df82be84e (diff) |
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]>
-rw-r--r-- | net/netfilter/ipvs/ip_vs_lblc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c index 08147fc6400c..b9f375e6dc93 100644 --- a/net/netfilter/ipvs/ip_vs_lblc.c +++ b/net/netfilter/ipvs/ip_vs_lblc.c @@ -372,6 +372,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 |