aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2012-10-08 07:41:17 -0400
committerDavid S. Miller <davem@davemloft.net>2012-10-08 17:42:35 -0400
commitf8a17175c63fd3e8b573719f7538816f8c96abf4 (patch)
tree5f592b7613c48716dc1a88bfd688129d24e62324 /net/ipv4/route.c
parente0adef0f7456d5d3a3bfe8ea61c7dddf146b40e1 (diff)
ipv4: make sure nh_pcpu_rth_output is always allocated
Avoid checking nh_pcpu_rth_output in fast path, abort fib_info creation on alloc_percpu failure. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index b90da1bc2704..5b0180f11b20 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1207,8 +1207,6 @@ static bool rt_cache_route(struct fib_nh *nh, struct rtable *rt)
1207 if (rt_is_input_route(rt)) { 1207 if (rt_is_input_route(rt)) {
1208 p = (struct rtable **)&nh->nh_rth_input; 1208 p = (struct rtable **)&nh->nh_rth_input;
1209 } else { 1209 } else {
1210 if (!nh->nh_pcpu_rth_output)
1211 goto nocache;
1212 p = (struct rtable **)__this_cpu_ptr(nh->nh_pcpu_rth_output); 1210 p = (struct rtable **)__this_cpu_ptr(nh->nh_pcpu_rth_output);
1213 } 1211 }
1214 orig = *p; 1212 orig = *p;
@@ -1223,7 +1221,6 @@ static bool rt_cache_route(struct fib_nh *nh, struct rtable *rt)
1223 * unsuccessful at storing this route into the cache 1221 * unsuccessful at storing this route into the cache
1224 * we really need to set it. 1222 * we really need to set it.
1225 */ 1223 */
1226nocache:
1227 rt->dst.flags |= DST_NOCACHE; 1224 rt->dst.flags |= DST_NOCACHE;
1228 ret = false; 1225 ret = false;
1229 } 1226 }