]> git.neil.brown.name Git - history.git/commitdiff
[NET]: More error checking in flow cache init function.
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 19 Jun 2003 11:50:27 +0000 (04:50 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Thu, 19 Jun 2003 11:50:27 +0000 (04:50 -0700)
net/core/flow.c

index 3ebb6fc78afcff6739e20824462fc891b0a445e5..87a5b21694c9f0ced8055e987235845d890f040d 100644 (file)
@@ -388,11 +388,14 @@ static int __init flow_cache_init(void)
        add_timer(&flow_hash_rnd_timer);
 
        register_cpu_notifier(&flow_cache_cpu_nb);
-       for (i = 0; i < NR_CPUS; i++)
-               if (cpu_online(i)) {
-                       flow_cache_cpu_prepare(i);
-                       flow_cache_cpu_online(i);
-               }
+       for (i = 0; i < NR_CPUS; i++) {
+               if (!cpu_online(i))
+                       continue;
+               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;
 }