netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH nf-next 3/4] netfilter: add inet ingress support
Date: Thu, 8 Oct 2020 09:04:04 +0800	[thread overview]
Message-ID: <202010080838.9qCKqGdj-lkp@intel.com> (raw)
In-Reply-To: <20201007231448.27346-4-pablo@netfilter.org>

[-- Attachment #1: Type: text/plain, Size: 3613 bytes --]

Hi Pablo,

I love your patch! Yet something to improve:

[auto build test ERROR on nf-next/master]

url:    https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/Add-nf_tables-ingress-hook-for-the-inet-family/20201008-071530
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: x86_64-randconfig-s022-20201008 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-218-gc0e96d6d-dirty
        # https://github.com/0day-ci/linux/commit/4a788f545ac2e08b0c08658e156da55e2fce5ae6
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Pablo-Neira-Ayuso/Add-nf_tables-ingress-hook-for-the-inet-family/20201008-071530
        git checkout 4a788f545ac2e08b0c08658e156da55e2fce5ae6
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

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

   net/netfilter/core.c: In function 'nf_hook_entry_head':
>> net/netfilter/core.c:292:14: error: 'struct net_device' has no member named 'nf_hooks_ingress'
     292 |   return &dev->nf_hooks_ingress;
         |              ^~
>> net/netfilter/core.c:288:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
     288 |   if (!dev || dev_net(dev) != net) {
         |       ~~~~~^~~~~~~~~~~~~~~~~~~~~~
   net/netfilter/core.c:293:2: note: here
     293 |  case NFPROTO_IPV4:
         |  ^~~~
   At top level:
   net/netfilter/core.c:336:13: warning: 'nf_ingress_hook' defined but not used [-Wunused-function]
     336 | static bool nf_ingress_hook(const struct nf_hook_ops *reg, int pf)
         |             ^~~~~~~~~~~~~~~

vim +292 net/netfilter/core.c

   265	
   266	static struct nf_hook_entries __rcu **
   267	nf_hook_entry_head(struct net *net, int pf, unsigned int hooknum,
   268			   struct net_device *dev)
   269	{
   270		switch (pf) {
   271		case NFPROTO_NETDEV:
   272			break;
   273	#ifdef CONFIG_NETFILTER_FAMILY_ARP
   274		case NFPROTO_ARP:
   275			if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_arp) <= hooknum))
   276				return NULL;
   277			return net->nf.hooks_arp + hooknum;
   278	#endif
   279	#ifdef CONFIG_NETFILTER_FAMILY_BRIDGE
   280		case NFPROTO_BRIDGE:
   281			if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_bridge) <= hooknum))
   282				return NULL;
   283			return net->nf.hooks_bridge + hooknum;
   284	#endif
   285		case NFPROTO_INET:
   286			if (WARN_ON_ONCE(hooknum != NF_INET_INGRESS))
   287				return NULL;
 > 288			if (!dev || dev_net(dev) != net) {
   289				WARN_ON_ONCE(1);
   290				return NULL;
   291			}
 > 292			return &dev->nf_hooks_ingress;
   293		case NFPROTO_IPV4:
   294			if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_ipv4) <= hooknum))
   295				return NULL;
   296			return net->nf.hooks_ipv4 + hooknum;
   297		case NFPROTO_IPV6:
   298			if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_ipv6) <= hooknum))
   299				return NULL;
   300			return net->nf.hooks_ipv6 + hooknum;
   301	#if IS_ENABLED(CONFIG_DECNET)
   302		case NFPROTO_DECNET:
   303			if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_decnet) <= hooknum))
   304				return NULL;
   305			return net->nf.hooks_decnet + hooknum;
   306	#endif
   307		default:
   308			WARN_ON_ONCE(1);
   309			return NULL;
   310		}
   311	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32199 bytes --]

  reply	other threads:[~2020-10-08  1:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 23:14 [PATCH nf-next 0/4] Add nf_tables ingress hook for the inet family Pablo Neira Ayuso
2020-10-07 23:14 ` [PATCH nf-next 1/4] netfilter: add nf_static_key_{inc,dec} Pablo Neira Ayuso
2020-10-07 23:14 ` [PATCH nf-next 2/4] netfilter: add nf_ingress_hook() helper function Pablo Neira Ayuso
2020-10-07 23:14 ` [PATCH nf-next 3/4] netfilter: add inet ingress support Pablo Neira Ayuso
2020-10-08  1:04   ` kernel test robot [this message]
2020-10-08  2:23   ` kernel test robot
2020-10-07 23:14 ` [PATCH nf-next 4/4] netfilter: nf_tables: " Pablo Neira Ayuso
2020-10-07 23:22 ` [PATCH nf-next 0/4] Add nf_tables ingress hook for the inet family Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202010080838.9qCKqGdj-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).