netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] netfilter: connlimit: fix UP build
       [not found] <53275dbf./J0nBeffRcN62Ddt%fengguang.wu@intel.com>
@ 2014-03-17 21:27 ` Florian Westphal
  2014-03-18  9:20   ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2014-03-17 21:27 UTC (permalink / raw)
  To: netfilter-devel; +Cc: netdev, Florian Westphal

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-(

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)
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] netfilter: connlimit: fix UP build
  2014-03-17 21:27 ` [PATCH -next] netfilter: connlimit: fix UP build Florian Westphal
@ 2014-03-18  9:20   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2014-03-18  9:20 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netfilter-devel, netdev

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-18  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <53275dbf./J0nBeffRcN62Ddt%fengguang.wu@intel.com>
2014-03-17 21:27 ` [PATCH -next] netfilter: connlimit: fix UP build Florian Westphal
2014-03-18  9:20   ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).