netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Konieczny <jajcus@bnet.pl>
To: kuznet@ms2.inr.ac.ru
Cc: netdev@oss.sgi.com
Subject: Re: "new style" netdevice allocation patch for TUN driver (2.4.18 kernel)
Date: Thu, 1 Aug 2002 19:52:06 +0200	[thread overview]
Message-ID: <20020801175204.GC17308@nic.nigdzie> (raw)
In-Reply-To: <200208011743.VAA07150@sex.inr.ac.ru>

On Thu, Aug 01, 2002 at 09:43:23PM +0400, kuznet@ms2.inr.ac.ru wrote:
> Hello!
> 
> > network. And "unregister_netdevice: waiting for tun0 to become free"
> 
> This smells like a leakage. I think this should be investigated.
I am not sure. Sometimes it is not easy to free such device.

> > devices, and that only the "old style" devices have this problem.
> > I had similar problem with VLAN devices some time ago, so I checked VLAN
> > driver sources too.
> 
> Well, switching to "new style" does not solve the problem. If we have
> a leakage, it will continue silently which is even worse.
> Probably, you should to define NET_REFCNT_DEBUG in net/core/dev.c
> to track what happens with the device.
After applying my patch, the device unregistration is usually defered,
but finally it is finished. On system shutdown, when all routes are
removed, all interfaces downed and all processes killed the device will
not be used any more and the device is freed. Without the patch my
system doesn't even come to this point, as it stops on the first process
which tries to access any network device (eg. any iproute2 command).
Usually it stops on postfix shutdown. Probably because I use the tun
device for tunneling SMTP connections to my home machine. Probably
shutting down postfix before openvpn would help, but failing to do this
should not hang the system.

And even if there is a bug in tun module it should never prevent system
from clean shutdown. Even if the device will be never freed and module
unloaded. So I thing this patch (or similar) should be applied.

Greets,
        Jacek

  reply	other threads:[~2002-08-01 17:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020801133506.GA22073@serwus.bnet.pl>
2002-08-01 17:43 ` "new style" netdevice allocation patch for TUN driver (2.4.18 kernel) kuznet
2002-08-01 17:52   ` Jacek Konieczny [this message]
2002-08-01 18:01     ` kuznet
2002-08-02  0:27     ` two net_device ? ??
2002-08-01 13:35 "new style" netdevice allocation patch for TUN driver (2.4.18 kernel) Jacek Konieczny

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=20020801175204.GC17308@nic.nigdzie \
    --to=jajcus@bnet.pl \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@oss.sgi.com \
    /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).