netfilter: nf_conntrack: ensure that CONNTRACK_LOCKS is power of 2
[linux-2.6-microblaze.git] / net / netfilter / nf_conntrack_core.c
index ff9313c..82bfbee 100644 (file)
@@ -2480,6 +2480,7 @@ int nf_conntrack_init_net(struct net *net)
        int cpu;
 
        BUILD_BUG_ON(IP_CT_UNTRACKED == IP_CT_NUMBER);
+       BUILD_BUG_ON_NOT_POWER_OF_2(CONNTRACK_LOCKS);
        atomic_set(&net->ct.count, 0);
 
        net->ct.pcpu_lists = alloc_percpu(struct ct_pcpu);