netfilter: xtables: fix build failure from COMPAT_XT_ALIGN outside CONFIG_COMPAT
authorWillem de Bruijn <willemb@google.com>
Wed, 17 May 2017 15:24:47 +0000 (11:24 -0400)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 18 May 2017 11:10:03 +0000 (13:10 +0200)
commit751a9c763849f5859cb69ea44b0430d00672f637
treeefbea6658744764f2ca567bfe0a9481ac6b55578
parentc953d63548207a085abcb12a15fefc8a11ffdf0a
netfilter: xtables: fix build failure from COMPAT_XT_ALIGN outside CONFIG_COMPAT

The patch in the Fixes references COMPAT_XT_ALIGN in the definition
of XT_DATA_TO_USER, outside an #ifdef CONFIG_COMPAT block.

Split XT_DATA_TO_USER into separate compat and non compat variants and
define the first inside an CONFIG_COMPAT block.

This simplifies both variants by removing branches inside the macro.

Fixes: 324318f0248c ("netfilter: xtables: zero padding in data_to_user")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/x_tables.c