[bug report] netfilter: convert while loops to for loops

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

 



Hello Aaron Conole,

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

The patch 66cfc1dd07c7: "netfilter: convert while loops to for loops" 
from Nov 15, 2016, leads to the following Smatch complaint:

net/bridge/br_netfilter_hooks.c:1016 br_nf_hook_thresh()
	 warn: variable dereferenced before check 'elem' (see line 1012)

net/bridge/br_netfilter_hooks.c
  1011		for (elem = rcu_dereference(net->nf.hooks[NFPROTO_BRIDGE][hook]);
  1012		     nf_hook_entry_priority(elem) <= NF_BR_PRI_BRNF;
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dereference inside function.

  1013		     elem = rcu_dereference(elem->next))
  1014			;
  1015	
  1016		if (!elem)
                     ^^^^
This can't be reached without already dereferencing "elem".

  1017			return okfn(net, sk, skb);
  1018	

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