diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/route.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index ff98983d2a45..d6cb2bfcd8e1 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1105,9 +1105,9 @@ restart: | |||
1105 | * Note that we do rt_free on this new route entry, so that | 1105 | * Note that we do rt_free on this new route entry, so that |
1106 | * once its refcount hits zero, we are still able to reap it | 1106 | * once its refcount hits zero, we are still able to reap it |
1107 | * (Thanks Alexey) | 1107 | * (Thanks Alexey) |
1108 | * Note also the rt_free uses call_rcu. We don't actually | 1108 | * Note: To avoid expensive rcu stuff for this uncached dst, |
1109 | * need rcu protection here, this is just our path to get | 1109 | * we set DST_NOCACHE so that dst_release() can free dst without |
1110 | * on the route gc list. | 1110 | * waiting a grace period. |
1111 | */ | 1111 | */ |
1112 | 1112 | ||
1113 | rt->dst.flags |= DST_NOCACHE; | 1113 | rt->dst.flags |= DST_NOCACHE; |
@@ -1117,12 +1117,11 @@ restart: | |||
1117 | if (net_ratelimit()) | 1117 | if (net_ratelimit()) |
1118 | printk(KERN_WARNING | 1118 | printk(KERN_WARNING |
1119 | "Neighbour table failure & not caching routes.\n"); | 1119 | "Neighbour table failure & not caching routes.\n"); |
1120 | rt_drop(rt); | 1120 | ip_rt_put(rt); |
1121 | return err; | 1121 | return err; |
1122 | } | 1122 | } |
1123 | } | 1123 | } |
1124 | 1124 | ||
1125 | rt_free(rt); | ||
1126 | goto skip_hashing; | 1125 | goto skip_hashing; |
1127 | } | 1126 | } |
1128 | 1127 | ||