[bug report] netfilter: add struct nf_nat_hook and use it

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

 



Hello Pablo Neira Ayuso,

This is a semi-automatic email about new static checker warnings.

The patch 2c205dd3981f: "netfilter: add struct nf_nat_hook and use 
it" from May 23, 2018, leads to the following Smatch complaint:

    net/netfilter/nf_conntrack_netlink.c:1449 ctnetlink_parse_nat_setup()
     error: we previously assumed 'nat_hook' could be null (see line 1438)

net/netfilter/nf_conntrack_netlink.c
  1437		nat_hook = rcu_dereference(nf_nat_hook);
  1438		if (!nat_hook) {
                     ^^^^^^^^
  1439	#ifdef CONFIG_MODULES
  1440			rcu_read_unlock();
  1441			nfnl_unlock(NFNL_SUBSYS_CTNETLINK);
  1442			if (request_module("nf-nat") < 0) {
  1443				nfnl_lock(NFNL_SUBSYS_CTNETLINK);
  1444				rcu_read_lock();
  1445				return -EOPNOTSUPP;
  1446			}
  1447			nfnl_lock(NFNL_SUBSYS_CTNETLINK);
  1448			rcu_read_lock();
  1449			if (nat_hook->parse_nat_setup)
                            ^^^^^^^^
  1450				return -EAGAIN;
  1451	#endif

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux