Re: Linux 4.2.4

From: Gerhard Wiesinger
Date: Sun Oct 25 2015 - 16:09:18 EST

On 25.10.2015 20:46, Jozsef Kadlecsik wrote:

On Sun, 25 Oct 2015, Gerhard Wiesinger wrote:

On 25.10.2015 10:46, Willy Tarreau wrote:
ipset *triggered* the problem. The whole stack dump would tell more.
OK, find the stack traces in the bug report:

Kernel 4.1.10 triggered also a kernel dump when playing with ipset commands
and IPv6, details in the bug report ....
It seems to me it is an architecture-specific alignment issue. I don't
have a Cortex-A7 ARM hardware and qemu doesn't seem to support it either,
so I'm unable to reproduce it (ipset passes all my tests on my hardware,
including more complex ones than what breaks here). My first wild guess is
that the dynamic array of the element structure is not aligned properly.
Could you give a try to the next patch?

diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h
index afe905c..1cf357d 100644
--- a/net/netfilter/ipset/ip_set_hash_gen.h
+++ b/net/netfilter/ipset/ip_set_hash_gen.h
@@ -1211,6 +1211,9 @@ static const struct ip_set_type_variant mtype_variant = {
.same_set = mtype_same_set,
+#define IP_SET_BASE_ALIGN(dtype) \
+ ALIGN(sizeof(struct dtype), __alignof__(struct dtype))
static int
IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set,
@@ -1319,12 +1322,12 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set,
set->variant = &IPSET_TOKEN(HTYPE, 4_variant);
set->dsize = ip_set_elem_len(set, tb,
- sizeof(struct IPSET_TOKEN(HTYPE, 4_elem)));
} else {
set->variant = &IPSET_TOKEN(HTYPE, 6_variant);
set->dsize = ip_set_elem_len(set, tb,
- sizeof(struct IPSET_TOKEN(HTYPE, 6_elem)));

If that does not solve it, then could you help to narrow down the issue?
Does the bug still appear if your remove the counter extension of the set?

Hello Jozsef,

Patch applied well, compiling ...

Interesting, that it didn't happen before. Device is in production for more than 2 month without any issue.

Also any idea regarding the second isssue? Or do you think it has the same root cause?

Greetings from Vienna, Austria :-)

BTW: You can get the Banana Pi R1 for example at:
I can really recommend it as a router. Power consumption is as less as 3W. Price is also IMHO very good.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at