Commit a116ffd9 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[NET]: More error checking in flow cache init function.

parent b73c3156
...@@ -388,11 +388,14 @@ static int __init flow_cache_init(void) ...@@ -388,11 +388,14 @@ static int __init flow_cache_init(void)
add_timer(&flow_hash_rnd_timer); add_timer(&flow_hash_rnd_timer);
register_cpu_notifier(&flow_cache_cpu_nb); register_cpu_notifier(&flow_cache_cpu_nb);
for (i = 0; i < NR_CPUS; i++) for (i = 0; i < NR_CPUS; i++) {
if (cpu_online(i)) { if (!cpu_online(i))
flow_cache_cpu_prepare(i); continue;
flow_cache_cpu_online(i); if (flow_cache_cpu_prepare(i) == NOTIFY_OK &&
} flow_cache_cpu_online(i) == NOTIFY_OK)
continue;
panic("NET: failed to initialise flow cache hash table\n");
}
return 0; return 0;
} }
......
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