From: David Miller <davem@davemloft.net>
To: ebiederm@xmission.com
Cc: dlezcano@fr.ibm.com, containers@lists.osdl.org, den@openvz.org,
xemul@openvz.org, netdev@vger.kernel.org
Subject: Re: [PATCH 3/3] net: Don't leak packets when a netns is going down
Date: Wed, 05 Nov 2008 16:00:54 -0800 (PST) [thread overview]
Message-ID: <20081105.160054.261042048.davem@davemloft.net> (raw)
In-Reply-To: <m1skq53g9l.fsf_-_@frodo.ebiederm.org>
From: ebiederm@xmission.com (Eric W. Biederman)
Date: Wed, 05 Nov 2008 15:27:34 -0800
>
> I have been tracking for a while a case where when the
> network namespace exits the cleanup gets stck in an
> endless precessess of:
>
> unregister_netdevice: waiting for lo to become free. Usage count = 3
> unregister_netdevice: waiting for lo to become free. Usage count = 3
> unregister_netdevice: waiting for lo to become free. Usage count = 3
> unregister_netdevice: waiting for lo to become free. Usage count = 3
> unregister_netdevice: waiting for lo to become free. Usage count = 3
> unregister_netdevice: waiting for lo to become free. Usage count = 3
> unregister_netdevice: waiting for lo to become free. Usage count = 3
>
> It turns out that if you listen on a multicast address an unsubscribe
> packet is sent when the network device goes down. If you shutdown
> the network namespace without carefully cleaning up this can trigger
> the unsubscribe packet to be sent over the loopback interface while
> the network namespace is going down.
>
> All of which is fine except when we drop the packet and forget to
> free it leaking the skb and the dst entry attached to. As it
> turns out the dst entry hold a reference to the idev which holds
> the dev and keeps everything from being cleaned up. Yuck!
>
> By fixing my earlier thinko and add the needed kfree_skb and everything
> cleans up beautifully.
>
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Applied.
next prev parent reply other threads:[~2008-11-06 0:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m18wt6v7eb.fsf@frodo.ebiederm.org>
[not found] ` <48EB36FC.4000008@fr.ibm.com>
[not found] ` <48EB3F72.5090201@openvz.org>
[not found] ` <m1d4ic4pbr.fsf@frodo.ebiederm.org>
[not found] ` <48ECA8D2.4090406@openvz.org>
[not found] ` <m14p2l4v2l.fsf_-_@frodo.ebiederm.org>
2008-11-05 23:25 ` [PATCH 2/3] net: Guaranetee the proper ordering of the loopback device Eric W. Biederman
2008-11-05 23:27 ` [PATCH 3/3] net: Don't leak packets when a netns is going down Eric W. Biederman
2008-11-06 0:00 ` David Miller [this message]
2008-11-06 0:00 ` [PATCH 2/3] net: Guaranetee the proper ordering of the loopback device David Miller
2008-11-06 13:02 ` Eric W. Biederman
2008-11-06 15:34 ` [PATCH 1/2] net: fib_rules ordering fixes Eric W. Biederman
2008-11-06 15:36 ` [PATCH 2/2] net: Guaranetee the proper ordering of the loopback device. v2 Eric W. Biederman
2008-11-08 6:55 ` David Miller
2008-11-08 6:54 ` [PATCH 1/2] net: fib_rules ordering fixes David Miller
2008-11-06 21:20 ` [PATCH 2/3] net: Guaranetee the proper ordering of the loopback device David Miller
2008-11-08 6:53 ` David Miller
2008-11-08 7:13 ` Eric W. Biederman
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=20081105.160054.261042048.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=containers@lists.osdl.org \
--cc=den@openvz.org \
--cc=dlezcano@fr.ibm.com \
--cc=ebiederm@xmission.com \
--cc=netdev@vger.kernel.org \
--cc=xemul@openvz.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;
as well as URLs for NNTP newsgroup(s).