[nf-next:master 43/54] net/netfilter/core.c:96:30: error: 'struct net_device' has no member named 'nf_hooks_ingress'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
head:   f20fbc0717f9f007c94b2641134b19228d0ce9ed
commit: e3b37f11e6e4e6b6f02cc762f182ce233d2c1c9d [43/54] netfilter: replace list_head with single linked list
config: x86_64-randconfig-x014-09252039 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout e3b37f11e6e4e6b6f02cc762f182ce233d2c1c9d
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: the nf-next/master HEAD f20fbc0717f9f007c94b2641134b19228d0ce9ed builds fine.
      It only hurts bisectibility.

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from net/netfilter/core.c:10:
   net/netfilter/core.c: In function 'nf_set_hooks_head':
>> net/netfilter/core.c:96:30: error: 'struct net_device' has no member named 'nf_hooks_ingress'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                                 ^
   include/linux/compiler.h:299:17: note: in definition of macro 'WRITE_ONCE'
     union { typeof(x) __val; char __c[1]; } __u = \
                    ^
>> net/netfilter/core.c:96:3: note: in expansion of macro 'rcu_assign_pointer'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
      ^~~~~~~~~~~~~~~~~~
>> net/netfilter/core.c:96:30: error: 'struct net_device' has no member named 'nf_hooks_ingress'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                                 ^
   include/linux/compiler.h:300:30: note: in definition of macro 'WRITE_ONCE'
      { .__val = (__force typeof(x)) (val) }; \
                                 ^
>> net/netfilter/core.c:96:3: note: in expansion of macro 'rcu_assign_pointer'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
      ^~~~~~~~~~~~~~~~~~
>> net/netfilter/core.c:96:30: error: 'struct net_device' has no member named 'nf_hooks_ingress'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                                 ^
   include/linux/compiler.h:300:35: note: in definition of macro 'WRITE_ONCE'
      { .__val = (__force typeof(x)) (val) }; \
                                      ^~~
>> net/netfilter/core.c:96:3: note: in expansion of macro 'rcu_assign_pointer'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
      ^~~~~~~~~~~~~~~~~~
>> net/netfilter/core.c:96:30: error: 'struct net_device' has no member named 'nf_hooks_ingress'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                                 ^
   include/linux/compiler.h:301:22: note: in definition of macro 'WRITE_ONCE'
     __write_once_size(&(x), __u.__c, sizeof(x)); \
                         ^
>> net/netfilter/core.c:96:3: note: in expansion of macro 'rcu_assign_pointer'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
      ^~~~~~~~~~~~~~~~~~
>> net/netfilter/core.c:96:30: error: 'struct net_device' has no member named 'nf_hooks_ingress'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                                 ^
   include/linux/compiler.h:301:42: note: in definition of macro 'WRITE_ONCE'
     __write_once_size(&(x), __u.__c, sizeof(x)); \
                                             ^
>> net/netfilter/core.c:96:3: note: in expansion of macro 'rcu_assign_pointer'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
      ^~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from net/netfilter/core.c:10:
>> net/netfilter/core.c:96:30: error: 'struct net_device' has no member named 'nf_hooks_ingress'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                                 ^
   include/linux/compiler.h:471:19: note: in definition of macro '__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:491:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
>> include/linux/compiler.h:494:2: note: in expansion of macro 'compiletime_assert'
     compiletime_assert(__native_word(t),    \
     ^~~~~~~~~~~~~~~~~~
>> include/linux/compiler.h:494:21: note: in expansion of macro '__native_word'
     compiletime_assert(__native_word(t),    \
                        ^~~~~~~~~~~~~
>> include/asm-generic/barrier.h:181:2: note: in expansion of macro 'compiletime_assert_atomic_type'
     compiletime_assert_atomic_type(*p);    \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/rcupdate.h:667:3: note: in expansion of macro 'smp_store_release'
      smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
      ^~~~~~~~~~~~~~~~~
>> net/netfilter/core.c:96:3: note: in expansion of macro 'rcu_assign_pointer'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
      ^~~~~~~~~~~~~~~~~~
>> net/netfilter/core.c:96:30: error: 'struct net_device' has no member named 'nf_hooks_ingress'
      rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
                                 ^
   include/linux/compiler.h:471:19: note: in definition of macro '__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:491:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
>> include/linux/compiler.h:494:2: note: in expansion of macro 'compiletime_assert'
     compiletime_assert(__native_word(t),    \
     ^~~~~~~~~~~~~~~~~~
>> include/linux/compiler.h:494:21: note: in expansion of macro '__native_word'
     compiletime_assert(__native_word(t),    \
                        ^~~~~~~~~~~~~
>> include/asm-generic/barrier.h:181:2: note: in expansion of macro 'compiletime_assert_atomic_type'
     compiletime_assert_atomic_type(*p);    \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +96 net/netfilter/core.c

     4	 * Thanks to Rob `CmdrTaco' Malda for not influencing this code in any
     5	 * way.
     6	 *
     7	 * Rusty Russell (C)2000 -- This code is GPL.
     8	 * Patrick McHardy (c) 2006-2012
     9	 */
  > 10	#include <linux/kernel.h>
    11	#include <linux/netfilter.h>
    12	#include <net/protocol.h>
    13	#include <linux/init.h>
    14	#include <linux/skbuff.h>
    15	#include <linux/wait.h>
    16	#include <linux/module.h>
    17	#include <linux/interrupt.h>
    18	#include <linux/if.h>
    19	#include <linux/netdevice.h>
    20	#include <linux/netfilter_ipv6.h>
    21	#include <linux/inetdevice.h>
    22	#include <linux/proc_fs.h>
    23	#include <linux/mutex.h>
    24	#include <linux/slab.h>
    25	#include <linux/rcupdate.h>
    26	#include <net/net_namespace.h>
    27	#include <net/sock.h>
    28	
    29	#include "nf_internals.h"
    30	
    31	static DEFINE_MUTEX(afinfo_mutex);
    32	
    33	const struct nf_afinfo __rcu *nf_afinfo[NFPROTO_NUMPROTO] __read_mostly;
    34	EXPORT_SYMBOL(nf_afinfo);
    35	const struct nf_ipv6_ops __rcu *nf_ipv6_ops __read_mostly;
    36	EXPORT_SYMBOL_GPL(nf_ipv6_ops);
    37	
    38	DEFINE_PER_CPU(bool, nf_skb_duplicated);
    39	EXPORT_SYMBOL_GPL(nf_skb_duplicated);
    40	
    41	int nf_register_afinfo(const struct nf_afinfo *afinfo)
    42	{
    43		mutex_lock(&afinfo_mutex);
    44		RCU_INIT_POINTER(nf_afinfo[afinfo->family], afinfo);
    45		mutex_unlock(&afinfo_mutex);
    46		return 0;
    47	}
    48	EXPORT_SYMBOL_GPL(nf_register_afinfo);
    49	
    50	void nf_unregister_afinfo(const struct nf_afinfo *afinfo)
    51	{
    52		mutex_lock(&afinfo_mutex);
    53		RCU_INIT_POINTER(nf_afinfo[afinfo->family], NULL);
    54		mutex_unlock(&afinfo_mutex);
    55		synchronize_rcu();
    56	}
    57	EXPORT_SYMBOL_GPL(nf_unregister_afinfo);
    58	
    59	#ifdef HAVE_JUMP_LABEL
    60	struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS];
    61	EXPORT_SYMBOL(nf_hooks_needed);
    62	#endif
    63	
    64	static DEFINE_MUTEX(nf_hook_mutex);
    65	#define nf_entry_dereference(e) \
    66		rcu_dereference_protected(e, lockdep_is_held(&nf_hook_mutex))
    67	
    68	static struct nf_hook_entry *nf_hook_entry_head(struct net *net,
    69							const struct nf_hook_ops *reg)
    70	{
    71		struct nf_hook_entry *hook_head = NULL;
    72	
    73		if (reg->pf != NFPROTO_NETDEV)
    74			hook_head = nf_entry_dereference(net->nf.hooks[reg->pf]
    75							 [reg->hooknum]);
    76		else if (reg->hooknum == NF_NETDEV_INGRESS) {
    77	#ifdef CONFIG_NETFILTER_INGRESS
    78			if (reg->dev && dev_net(reg->dev) == net)
    79				hook_head =
    80					nf_entry_dereference(
    81						reg->dev->nf_hooks_ingress);
    82	#endif
    83		}
    84		return hook_head;
    85	}
    86	
    87	/* must hold nf_hook_mutex */
    88	static void nf_set_hooks_head(struct net *net, const struct nf_hook_ops *reg,
    89				      struct nf_hook_entry *entry)
    90	{
    91		switch (reg->pf) {
    92		case NFPROTO_NETDEV:
    93			/* We already checked in nf_register_net_hook() that this is
    94			 * used from ingress.
    95			 */
  > 96			rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry);
    97			break;
    98		default:
    99			rcu_assign_pointer(net->nf.hooks[reg->pf][reg->hooknum],

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux