summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2014-03-17 22:27:50 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2014-04-03 23:52:07 +0200
commite5ac6eafba887821044c65b6fe59d9eb8b7c7f61 (patch)
tree5652b8428bfeeefccfc7e9810922f19b4e58dcf4 /net
parentnet-gro: reset skb->truesize in napi_reuse_skb() (diff)
downloadlinux-e5ac6eafba887821044c65b6fe59d9eb8b7c7f61.tar.xz
linux-e5ac6eafba887821044c65b6fe59d9eb8b7c7f61.zip
netfilter: connlimit: fix UP build
cannot use ARRAY_SIZE() if spinlock_t is empty struct. Fixes: 1442e7507dd597 ("netfilter: connlimit: use keyed locks") Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/xt_connlimit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
index 458464e7bd7a..a6e129eb3aa0 100644
--- a/net/netfilter/xt_connlimit.c
+++ b/net/netfilter/xt_connlimit.c
@@ -377,7 +377,7 @@ static int connlimit_mt_check(const struct xt_mtchk_param *par)
return -ENOMEM;
}
- for (i = 0; i < ARRAY_SIZE(info->data->locks); ++i)
+ for (i = 0; i < CONNLIMIT_LOCK_SLOTS; ++i)
spin_lock_init(&info->data->locks[i]);
for (i = 0; i < ARRAY_SIZE(info->data->climit_root4); ++i)