All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: yoshfuji@linux-ipv6.org, netdev@oss.sgi.com,
	linux-kernel@vger.kernel.org
Subject: Re: IPv6 oops on ifup in latest BK
Date: Mon, 23 Aug 2004 23:51:23 -0700	[thread overview]
Message-ID: <20040823235123.71f18c04.davem@redhat.com> (raw)
In-Reply-To: <412ADB20.5000901@pobox.com>

On Tue, 24 Aug 2004 02:07:28 -0400
Jeff Garzik <jgarzik@pobox.com> wrote:

> Attached minicom.cap.txt gives the ksymoops output and dmesg output. 
> Appears to die in ipv6_get_hoplimit.

Yoshifuji-san, it is rt6i_dev changes.  The problem is that
ipv6_get_hoplimit() gets called with NULL dev.

I believe it is an error in the logic for RTCF_REJECT
processing.  If user does not specify a specific device
index, and this is RTCF_REJECT, then we will end up
with dev being NULL.

It is this piece of code in ip6_route_add():

		if (dev && dev != &loopback_dev) {

It does not handle the case where dev == NULL correctly.
Original code did do the right thing:

		if (dev)
			dev_put(dev);
		dev = &loopback_dev;
		dev_hold(dev);

Maybe new code should be something like:

		if (dev && dev != &loopback_dev) {
			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?

  reply	other threads:[~2004-08-24  6:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-24  6:07 IPv6 oops on ifup in latest BK Jeff Garzik
2004-08-24  6:51 ` David S. Miller [this message]
2004-08-24  7:33   ` Herbert Xu
2004-08-24  8:22   ` YOSHIFUJI Hideaki / 吉藤英明
2004-08-24 18:36     ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040823235123.71f18c04.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.