From: Jarek Poplawski <jarkao2@gmail.com>
To: Chase Douglas <chasedouglas.lists@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: neigh_params_release() usage in net/ipv6/addrconf.c
Date: Sun, 17 May 2009 00:15:43 +0200 [thread overview]
Message-ID: <4A0F3B0F.2070209@gmail.com> (raw)
In-Reply-To: <8A0B031A-1483-49FD-A4AD-CA4EA87E9359@gmail.com>
Chase Douglas wrote, On 05/15/2009 06:33 PM:
> I'm debugging an issue I'm seeing when I use vlan with IPv6 support.
> After bringing up the device, I'm unable to bring it down and
> unregister it. I put some debug statements around dev_hold() and
> dev_put() to see what was going on:
>
> dev_hold() called on lo.2, new refcnt: 1 (net/core/dev.c:4162)
> dev_hold() called on lo.2, new refcnt: 2 (net/core/neighbour.c:1357)
> dev_hold() called on lo.2, new refcnt: 3 (net/ipv4/devinet.c:178)
> dev_hold() called on lo.2, new refcnt: 4 (net/core/neighbour.c:1357)
> dev_hold() called on lo.2, new refcnt: 5 (net/8021q/vlan.c:266)
> dev_hold() called on lo.2, new refcnt: 6 (net/core/link_watch.c:219)
> dev_put() called on lo.2, new refcnt: 5 (net/core/link_watch.c:191)
> dev_hold() called on lo.2, new refcnt: 6 (net/core/dev.c:684)
> dev_put() called on lo.2, new refcnt: 5 (net/ipv4/fib_semantics.c:149)
> dev_hold() called on lo.2, new refcnt: 6 (net/core/dev.c:684)
> dev_hold() called on lo.2, new refcnt: 7 (net/ipv4/fib_frontend.c:173)
> dev_put() called on lo.2, new refcnt: 6 (net/ipv4/route.c:2453)
> dev_put() called on lo.2, new refcnt: 5 (net/ipv4/fib_semantics.c:149)
> dev_put() called on lo.2, new refcnt: 4 (net/core/neighbour.c:1393)
> dev_put() called on lo.2, new refcnt: 3 (net/ipv4/devinet.c:151)
> dev_put() called on lo.2, new refcnt: 2 (net/core/dev.c:4010)
> dev_put() called on lo.2, new refcnt: 1 (net/8021q/vlan.c:182)
> unregister_netdevice: waiting for lo.2 to become free. Usage count = 2
>
> The fourth dev_hold() is in neigh_parms_alloc(), called by
> ipv6_add_dev(). The only place I see neigh_parms_release() called in
> addrconf.c is if ipv6_add_dev() fails later on, or when taking the
> device down in addrconf_ifdown(). Unfortunately, when I bring the vlan
> dev down I never see addrconf_ifdown() called with the how parameter
> set to 1, which is the only instance where neigh_parms_release() would
> be called.
You write about ipv6, but the log is ipv4 only or I miss something.
Anyway, it seems you do this vlan on the loopback. If so, there is:
if ((dev->flags & IFF_LOOPBACK) && how == 1)
how = 0;
at least before 2.6.29 kernels, and vlans copy most of the flags.
Otherwise, how == 1 should work OK.
> PS: I am running my tests using a slightly modified SLES 11 kernel. I
Generally, it's better to give the kernel number, because everybody
uses Debian here. ...Not! ;-)
Jarek P.
next prev parent reply other threads:[~2009-05-16 22:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-15 16:33 neigh_params_release() usage in net/ipv6/addrconf.c Chase Douglas
2009-05-16 22:15 ` Jarek Poplawski [this message]
2009-05-16 22:57 ` Chase Douglas
2009-05-17 11:09 ` Jarek Poplawski
2009-05-17 11:15 ` Jarek Poplawski
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=4A0F3B0F.2070209@gmail.com \
--to=jarkao2@gmail.com \
--cc=chasedouglas.lists@gmail.com \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox