Skip to contentSkip to conversation

netfilter: connlimit: fix UP build

PATCH Applied Florian Westphal 2 participants 2 messages Mar 17, 2014 – Mar 18, 2014 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 53275dbf./J0nBeffRcN62Ddt%[email protected]

Florian Westphal

author maintainer
#1 lore raw

PATCH 1/1 netfilter: connlimit: fix UP build

cannot use ARRAY_SIZE() if spinlock_t is empty struct.

Fixes 1442e7507dd597 ("netfilter: connlimit: use keyed locks")

---
Another one, did UP build with LOCKDEP=y 8-(

net/netfilter/xt_connlimit.c +1 -1
index 458464e..a6e129e 100644
@@ -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)
Signature · 1 line
1.8.1.5
maintainer Applied
#2 lore raw
Quoted 3 lines · Florian Westphal

cannot use ARRAY_SIZE() if spinlock_t is empty struct.

Fixes 1442e7507dd597 ("netfilter: connlimit: use keyed locks")

Applied, thanks.