diff mbox

[-next] netfilter: connlimit: fix UP build

Message ID 1395091670-28238-1-git-send-email-fw@strlen.de
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Florian Westphal March 17, 2014, 9:27 p.m. UTC
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>
---
Another one, did UP build with LOCKDEP=y  8-(

Comments

Pablo Neira Ayuso March 18, 2014, 9:20 a.m. UTC | #1
On Mon, Mar 17, 2014 at 10:27:50PM +0100, Florian Westphal wrote:
> cannot use ARRAY_SIZE() if spinlock_t is empty struct.
> 
> Fixes: 1442e7507dd597 ("netfilter: connlimit: use keyed locks")

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
index 458464e..a6e129e 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)