Thread (10 messages) flat view 10 messages, 5 authors, 2007-10-08

Re: [NET] IPv6 oops bisected

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2007-10-08 06:20:30
Also in: lkml

On Sun, Oct 07, 2007 at 11:16:08PM -0700, David Miller wrote:
quoted hunk ↗ jump to hunk
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index a7db84c..7109ad6 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1188,7 +1188,7 @@ int ip6_route_add(struct fib6_config *cfg)
 	if ((cfg->fc_flags & RTF_REJECT) ||
 	    (dev && (dev->flags&IFF_LOOPBACK) && !(addr_type&IPV6_ADDR_LOOPBACK))) {
 		/* hold loopback dev/idev if we haven't done so. */
-		if (dev != dev->nd_net->loopback_dev) {
+		if (!dev || (dev != dev->nd_net->loopback_dev)) {
 			if (dev) {
 				dev_put(dev);
 				in6_dev_put(idev);
Unfortunately this'll still oops a few lines down when it tries
to assign dev->nd_net->loopabck_dev to dev.  The issue here is
which namespace are we in if dev is NULL.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help