Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: bnx2: Fix the behavior of ethtool when ONBOOT=no qla3xxx: Don't sleep while holding lock. qla3xxx: Give the PHY time to come out of reset. ipv4 routing: Ensure that route cache entries are usable and reclaimable with caching is off net: Move rx skb_orphan call to where needed ipv6: Use correct data types for ICMPv6 type and code net: let KS8842 driver depend on HAS_IOMEM can: let SJA1000 driver depend on HAS_IOMEM netxen: fix firmware init handshake netxen: fix build with without CONFIG_PM netfilter: xt_rateest: fix comparison with self netfilter: xt_quota: fix incomplete initialization netfilter: nf_log: fix direct userspace memory access in proc handler netfilter: fix some sparse endianess warnings netfilter: nf_conntrack: fix conntrack lookup race netfilter: nf_conntrack: fix confirmation race condition netfilter: nf_conntrack: death_by_timeout() fix
This commit is contained in:
@@ -1093,8 +1093,27 @@ restart:
|
||||
* If we drop it here, the callers have no way to resolve routes
|
||||
* when we're not caching. Instead, just point *rp at rt, so
|
||||
* the caller gets a single use out of the route
|
||||
* Note that we do rt_free on this new route entry, so that
|
||||
* once its refcount hits zero, we are still able to reap it
|
||||
* (Thanks Alexey)
|
||||
* Note also the rt_free uses call_rcu. We don't actually
|
||||
* need rcu protection here, this is just our path to get
|
||||
* on the route gc list.
|
||||
*/
|
||||
goto report_and_exit;
|
||||
|
||||
if (rt->rt_type == RTN_UNICAST || rt->fl.iif == 0) {
|
||||
int err = arp_bind_neighbour(&rt->u.dst);
|
||||
if (err) {
|
||||
if (net_ratelimit())
|
||||
printk(KERN_WARNING
|
||||
"Neighbour table failure & not caching routes.\n");
|
||||
rt_drop(rt);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
rt_free(rt);
|
||||
goto skip_hashing;
|
||||
}
|
||||
|
||||
rthp = &rt_hash_table[hash].chain;
|
||||
@@ -1211,7 +1230,8 @@ restart:
|
||||
#if RT_CACHE_DEBUG >= 2
|
||||
if (rt->u.dst.rt_next) {
|
||||
struct rtable *trt;
|
||||
printk(KERN_DEBUG "rt_cache @%02x: %pI4", hash, &rt->rt_dst);
|
||||
printk(KERN_DEBUG "rt_cache @%02x: %pI4",
|
||||
hash, &rt->rt_dst);
|
||||
for (trt = rt->u.dst.rt_next; trt; trt = trt->u.dst.rt_next)
|
||||
printk(" . %pI4", &trt->rt_dst);
|
||||
printk("\n");
|
||||
@@ -1226,7 +1246,7 @@ restart:
|
||||
|
||||
spin_unlock_bh(rt_hash_lock_addr(hash));
|
||||
|
||||
report_and_exit:
|
||||
skip_hashing:
|
||||
if (rp)
|
||||
*rp = rt;
|
||||
else
|
||||
|
Reference in New Issue
Block a user