From 714c18b10ae5c4c1999b2925bcc4f47dd6fc484b Mon Sep 17 00:00:00 2001 From: Julian Anastasov Date: Mon, 8 Oct 2012 11:41:17 +0000 Subject: [PATCH] --- yaml --- r: 332928 b: refs/heads/master c: f8a17175c63fd3e8b573719f7538816f8c96abf4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/ipv4/fib_semantics.c | 2 ++ trunk/net/ipv4/route.c | 3 --- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 1e89705a31ff..4d1c753554b7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e0adef0f7456d5d3a3bfe8ea61c7dddf146b40e1 +refs/heads/master: f8a17175c63fd3e8b573719f7538816f8c96abf4 diff --git a/trunk/net/ipv4/fib_semantics.c b/trunk/net/ipv4/fib_semantics.c index 267753060ffc..71b125cd5db1 100644 --- a/trunk/net/ipv4/fib_semantics.c +++ b/trunk/net/ipv4/fib_semantics.c @@ -840,6 +840,8 @@ struct fib_info *fib_create_info(struct fib_config *cfg) change_nexthops(fi) { nexthop_nh->nh_parent = fi; nexthop_nh->nh_pcpu_rth_output = alloc_percpu(struct rtable __rcu *); + if (!nexthop_nh->nh_pcpu_rth_output) + goto failure; } endfor_nexthops(fi) if (cfg->fc_mx) { diff --git a/trunk/net/ipv4/route.c b/trunk/net/ipv4/route.c index b90da1bc2704..5b0180f11b20 100644 --- a/trunk/net/ipv4/route.c +++ b/trunk/net/ipv4/route.c @@ -1207,8 +1207,6 @@ static bool rt_cache_route(struct fib_nh *nh, struct rtable *rt) if (rt_is_input_route(rt)) { p = (struct rtable **)&nh->nh_rth_input; } else { - if (!nh->nh_pcpu_rth_output) - goto nocache; p = (struct rtable **)__this_cpu_ptr(nh->nh_pcpu_rth_output); } orig = *p; @@ -1223,7 +1221,6 @@ static bool rt_cache_route(struct fib_nh *nh, struct rtable *rt) * unsuccessful at storing this route into the cache * we really need to set it. */ -nocache: rt->dst.flags |= DST_NOCACHE; ret = false; }