netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@01.org, Pablo Neira Ayuso <pablo@netfilter.org>
Cc: kbuild-all@01.org, netfilter-devel@vger.kernel.org,
	coreteam@netfilter.org
Subject: [nf-next:nft-bridge8 8/8] net/netfilter/nf_conntrack_proto.c:557 nf_ct_netns_do_put() error: we previously assumed 'nf_ct_bridge_info' could be null (see line 552)
Date: Mon, 15 Apr 2019 11:23:30 +0300	[thread overview]
Message-ID: <20190415082330.GO31633@kadam> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git nft-bridge8
head:   ae378c12525a3fa600ba9c615a3b9f49ed1b2101
commit: ae378c12525a3fa600ba9c615a3b9f49ed1b2101 [8/8] netfilter: bridge: add basic conntrack support

smatch warnings:
net/netfilter/nf_conntrack_proto.c:557 nf_ct_netns_do_put() error: we previously assumed 'nf_ct_bridge_info' could be null (see line 552)

# https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git/commit/?id=ae378c12525a3fa600ba9c615a3b9f49ed1b2101
git remote add nf-next https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git
git remote update nf-next
git checkout ae378c12525a3fa600ba9c615a3b9f49ed1b2101
vim +/nf_ct_bridge_info +557 net/netfilter/nf_conntrack_proto.c

2c41f33c Florian Westphal  2017-05-30  532  
a0ae2562 Florian Westphal  2018-06-29  533  static void nf_ct_netns_do_put(struct net *net, u8 nfproto)
a0ae2562 Florian Westphal  2018-06-29  534  {
a0ae2562 Florian Westphal  2018-06-29  535  	struct nf_conntrack_net *cnet = net_generic(net, nf_conntrack_net_id);
a0ae2562 Florian Westphal  2018-06-29  536  
a0ae2562 Florian Westphal  2018-06-29  537  	mutex_lock(&nf_ct_proto_mutex);
a0ae2562 Florian Westphal  2018-06-29  538  	switch (nfproto) {
a0ae2562 Florian Westphal  2018-06-29  539  	case NFPROTO_IPV4:
a0ae2562 Florian Westphal  2018-06-29  540  		if (cnet->users4 && (--cnet->users4 == 0))
a0ae2562 Florian Westphal  2018-06-29  541  			nf_unregister_net_hooks(net, ipv4_conntrack_ops,
a0ae2562 Florian Westphal  2018-06-29  542  						ARRAY_SIZE(ipv4_conntrack_ops));
a0ae2562 Florian Westphal  2018-06-29  543  		break;
a0ae2562 Florian Westphal  2018-06-29  544  #if IS_ENABLED(CONFIG_IPV6)
a0ae2562 Florian Westphal  2018-06-29  545  	case NFPROTO_IPV6:
a0ae2562 Florian Westphal  2018-06-29  546  		if (cnet->users6 && (--cnet->users6 == 0))
a0ae2562 Florian Westphal  2018-06-29  547  			nf_unregister_net_hooks(net, ipv6_conntrack_ops,
a0ae2562 Florian Westphal  2018-06-29  548  						ARRAY_SIZE(ipv6_conntrack_ops));
a0ae2562 Florian Westphal  2018-06-29  549  		break;
a0ae2562 Florian Westphal  2018-06-29  550  #endif
ae378c12 Pablo Neira Ayuso 2019-03-29  551  	case NFPROTO_BRIDGE:
ae378c12 Pablo Neira Ayuso 2019-03-29 @552  		if (nf_ct_bridge_info &&
                                                            ^^^^^^^^^^^^^^^^^
ae378c12 Pablo Neira Ayuso 2019-03-29  553  		    cnet->users_bridge && (--cnet->users_bridge == 0))
ae378c12 Pablo Neira Ayuso 2019-03-29  554  			nf_unregister_net_hooks(net, nf_ct_bridge_info->ops,
ae378c12 Pablo Neira Ayuso 2019-03-29  555  						nf_ct_bridge_info->ops_size);
ae378c12 Pablo Neira Ayuso 2019-03-29  556  
ae378c12 Pablo Neira Ayuso 2019-03-29 @557  		module_put(nf_ct_bridge_info->me);
                                                                   ^^^^^^^^^^^^^^^^^^^^^
ae378c12 Pablo Neira Ayuso 2019-03-29  558  		break;
0e54d217 Davide Caratti    2016-11-07  559  	}
0e54d217 Davide Caratti    2016-11-07  560  
a0ae2562 Florian Westphal  2018-06-29  561  	mutex_unlock(&nf_ct_proto_mutex);
a0ae2562 Florian Westphal  2018-06-29  562  }
a0ae2562 Florian Westphal  2018-06-29  563  

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

                 reply	other threads:[~2019-04-15  8:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190415082330.GO31633@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=coreteam@netfilter.org \
    --cc=kbuild-all@01.org \
    --cc=kbuild@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).