Message ID | 873ajg1xa0.fsf@natisbad.org |
---|---|
State | Accepted, archived |
Headers | show |
From: arno@natisbad.org (Arnaud Ebalard) Date: Wed, 01 Oct 2008 11:26:31 +0200 > With the switch to a default value of 1 for xfrm_larval_drop in commit > 28faa979746b2352cd78a376bf9f52db953bda46 (ipsec: Make xfrm_larval_drop > default to 1), what seems to be a bug manage to surface on one of my > test box running today's net-next (*). > > When xfrm_tmpl_resolve() returns -EAGAIN in __xfrm_lookup(), the caller > is returned -EREMOTE and is expected to install a blackhole route. For > IPv6, the call to dst_alloc(&ip6_dst_blackhole_ops) performed by > ip6_dst_blackhole() produces the error provided below, because > kmem_cachep attribute seems to be uninitialized. This does not happen > when xfrm_larval_drop is set to 0. > > The patch below against today's net-next. Benjamin (in CC) reported on > the introduction of the bug (f2fc6a54585a1be6669613a31fbaba2ecbadcd36) > while adding network namespaces support to ipv6 routes. Applied to net-2.6, thanks Arnaud! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
David Miller <davem@davemloft.net> writes: > From: arno@natisbad.org (Arnaud Ebalard) > Date: Wed, 01 Oct 2008 11:26:31 +0200 > >> With the switch to a default value of 1 for xfrm_larval_drop in commit >> 28faa979746b2352cd78a376bf9f52db953bda46 (ipsec: Make xfrm_larval_drop >> default to 1), what seems to be a bug manage to surface on one of my >> test box running today's net-next (*). >> >> When xfrm_tmpl_resolve() returns -EAGAIN in __xfrm_lookup(), the caller >> is returned -EREMOTE and is expected to install a blackhole route. For >> IPv6, the call to dst_alloc(&ip6_dst_blackhole_ops) performed by >> ip6_dst_blackhole() produces the error provided below, because >> kmem_cachep attribute seems to be uninitialized. This does not happen >> when xfrm_larval_drop is set to 0. >> >> The patch below against today's net-next. Benjamin (in CC) reported on >> the introduction of the bug (f2fc6a54585a1be6669613a31fbaba2ecbadcd36) >> while adding network namespaces support to ipv6 routes. > > Applied to net-2.6, thanks Arnaud! Can you queue it for -stable (2.6.26) too, if not already done? a+ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: arno@natisbad.org (Arnaud Ebalard) Date: Wed, 01 Oct 2008 14:59:32 +0200 > David Miller <davem@davemloft.net> writes: > > > > Applied to net-2.6, thanks Arnaud! > > Can you queue it for -stable (2.6.26) too, if not already done? Done. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 776871e..f4385a6 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2708,6 +2708,8 @@ int __init ip6_route_init(void) if (ret) goto out_kmem_cache; + ip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops_template.kmem_cachep; + /* Registering of the loopback is done before this portion of code, * the loopback reference in rt6_info will not be taken, do it * manually for init_net */