* [bug report] netfilter: convert while loops to for loops
@ 2016-12-06 13:10 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-12-06 13:10 UTC (permalink / raw)
To: aconole; +Cc: netfilter-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-06 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-06 13:10 [bug report] netfilter: convert while loops to for loops 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).