This is a note to let you know that I've just added the patch titled
ipv4: make sure nh_pcpu_rth_output is always allocated
to the 3.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ipv4-make-sure-nh_pcpu_rth_output-is-always-allocated.patch
and it can be found in the queue-3.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 473bd4d9b43f5b02a022d6c9473decd1ca19472a Mon Sep 17 00:00:00 2001
From: Julian Anastasov <[email protected]>
Date: Mon, 8 Oct 2012 11:41:17 +0000
Subject: ipv4: make sure nh_pcpu_rth_output is always allocated
From: Julian Anastasov <[email protected]>
[ Upstream commit f8a17175c63fd3e8b573719f7538816f8c96abf4 ]
Avoid checking nh_pcpu_rth_output in fast path,
abort fib_info creation on alloc_percpu failure.
Signed-off-by: Julian Anastasov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/ipv4/fib_semantics.c | 2 ++
net/ipv4/route.c | 3 ---
2 files changed, 2 insertions(+), 3 deletions(-)
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -840,6 +840,8 @@ struct fib_info *fib_create_info(struct
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) {
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1210,8 +1210,6 @@ static bool rt_cache_route(struct fib_nh
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;
@@ -1226,7 +1224,6 @@ static bool rt_cache_route(struct fib_nh
* unsuccessful at storing this route into the cache
* we really need to set it.
*/
-nocache:
rt->dst.flags |= DST_NOCACHE;
ret = false;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.6/ipv4-fix-sending-of-redirects.patch
queue-3.6/ipvs-fix-arp-resolving-for-direct-routing-mode.patch
queue-3.6/ipv4-add-flowi_flag_known_nh.patch
queue-3.6/ipv4-fix-forwarding-for-strict-source-routes.patch
queue-3.6/ipv4-make-sure-nh_pcpu_rth_output-is-always-allocated.patch
queue-3.6/ipv4-introduce-rt_uses_gateway.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html