netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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)
@ 2019-04-15  8:23 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-04-15  8:23 UTC (permalink / raw)
  To: kbuild, Pablo Neira Ayuso; +Cc: kbuild-all, netfilter-devel, coreteam

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-15  8:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-15  8:23 [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) Dan Carpenter

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).