netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: ipv4: Perform peer validation on cached route lookup.
@ 2011-12-05 13:27 Dan Carpenter
  2011-12-05 13:31 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2011-12-05 13:27 UTC (permalink / raw)
  To: davem; +Cc: netdev

Hello David S. Miller,

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

The patch efbc368dcc64: "ipv4: Perform peer validation on cached 
route lookup." from Dec 1, 2011, leads to the following Smatch 
complaint:

net/ipv4/route.c +2369 ip_route_input_common()
	 error: we previously assumed 'rth' could be null (see line 2378)

net/ipv4/route.c
  2368		for (rth = rcu_dereference(rt_hash_table[hash].chain); rth;
  2369		     rth = rcu_dereference(rth->dst.rt_next)) {
                                           ^^^^^^^^^^^^^^^^
The dereference here will oops

  2370			if ((((__force u32)rth->rt_key_dst ^ (__force u32)daddr) |
  2371			     ((__force u32)rth->rt_key_src ^ (__force u32)saddr) |
  2372			     (rth->rt_route_iif ^ iif) |
  2373			     (rth->rt_key_tos ^ tos)) == 0 &&
  2374			    rth->rt_mark == skb->mark &&
  2375			    net_eq(dev_net(rth->dst.dev), net) &&
  2376			    !rt_is_expired(rth)) {
  2377				rth = ipv4_validate_peer(rth);
  2378				if (!rth)
  2379					continue;

if we hit this new continue statement.

  2380				if (noref) {

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-05 18:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-05 13:27 ipv4: Perform peer validation on cached route lookup Dan Carpenter
2011-12-05 13:31 ` Dan Carpenter
2011-12-05 18:22   ` David Miller

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