From: Patrick McHardy Date: Tue, 25 Apr 2006 00:16:28 +0000 (-0700) Subject: [NETFILTER]: Fix compat_xt_counters alignment for non-x86 X-Git-Tag: v3.12-rc1~36387 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55fe5866366ae42f259f27ae5962eb267d9ce172;p=kernel%2Fkernel-generic.git [NETFILTER]: Fix compat_xt_counters alignment for non-x86 Some (?) non-x86 architectures require 8byte alignment for u_int64_t even when compiled for 32bit, using u_int32_t in compat_xt_counters breaks on these architectures, use u_int64_t for everything but x86. Reported by Andreas Schwab . Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index f6bdef8..3870145 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h @@ -361,7 +361,11 @@ struct compat_xt_entry_target struct compat_xt_counters { +#if defined(CONFIG_X86_64) || defined(CONFIG_IA64) u_int32_t cnt[4]; +#else + u_int64_t cnt[2]; +#endif }; struct compat_xt_counters_info