Thread (5 messages) 5 messages, 4 authors, 2004-08-24

Re: IPv6 oops on ifup in latest BK

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2004-08-24 07:34:34
Also in: lkml

David S. Miller [off-list ref] wrote:
Maybe new code should be something like:

               if (dev && dev != &loopback_dev) {
You want
		 if (dev) {
here.
                       dev_put(dev);
                       in6_dev_put(idev);
               }
               dev = &loopback_dev;
               dev_hold(dev);
               idev = in6_dev_get(dev);
               if (!idev) {
                       err = -ENODEV;
                       goto out;
               }

What do you think?
Yes this would work.  But I think Yoshifuji-san is trying to avoid the
unnecessary put/get in the case where dev is already loopback_dev.
So something like this might work:

		if (dev != &loopback_dev) {
			if (dev) {
				dev_put(dev);
				in6_dev_put(idev);
			}
			...
		}
-- 
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