Commit 426d1b54 authored by Hirofumi Ogawa's avatar Hirofumi Ogawa Committed by Sridhar Samudrala

[IPV4]: rt_cache_stat initialization fix.

This patch adds initialization for forgotten rt_cache_stat.
However, kmalloc_percpu() may need things like kmalloc_percpu_zeroed().
parent de458ebd
......@@ -2658,6 +2658,12 @@ int __init ip_rt_init(void)
GFP_KERNEL);
if (!rt_cache_stat)
goto out_enomem1;
for (i = 0; i < NR_CPUS; i++) {
if (cpu_possible(i)) {
memset(per_cpu_ptr(rt_cache_stat, i), 0,
sizeof (struct rt_cache_stat));
}
}
devinet_init();
ip_fib_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment