aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/fib_semantics.c2
-rw-r--r--net/ipv4/route.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 267753060ffc..71b125cd5db1 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -840,6 +840,8 @@ struct fib_info *fib_create_info(struct fib_config *cfg)
840 change_nexthops(fi) { 840 change_nexthops(fi) {
841 nexthop_nh->nh_parent = fi; 841 nexthop_nh->nh_parent = fi;
842 nexthop_nh->nh_pcpu_rth_output = alloc_percpu(struct rtable __rcu *); 842 nexthop_nh->nh_pcpu_rth_output = alloc_percpu(struct rtable __rcu *);
843 if (!nexthop_nh->nh_pcpu_rth_output)
844 goto failure;
843 } endfor_nexthops(fi) 845 } endfor_nexthops(fi)
844 846
845 if (cfg->fc_mx) { 847 if (cfg->fc_mx) {
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 }