netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: "new style" netdevice allocation patch for TUN driver (2.4.18 kernel)
       [not found] <20020801133506.GA22073@serwus.bnet.pl>
@ 2002-08-01 17:43 ` kuznet
  2002-08-01 17:52   ` Jacek Konieczny
  0 siblings, 1 reply; 4+ messages in thread
From: kuznet @ 2002-08-01 17:43 UTC (permalink / raw)
  To: jajcus; +Cc: netdev

Hello!

> network. And "unregister_netdevice: waiting for tun0 to become free"

This smells like a leakage. I think this should be investigated.


> 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.

Alexey

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "new style" netdevice allocation patch for TUN driver (2.4.18 kernel)
  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
  2002-08-01 18:01     ` kuznet
  2002-08-02  0:27     ` two net_device ? ??
  0 siblings, 2 replies; 4+ messages in thread
From: Jacek Konieczny @ 2002-08-01 17:52 UTC (permalink / raw)
  To: kuznet; +Cc: netdev

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "new style" netdevice allocation patch for TUN driver (2.4.18 kernel)
  2002-08-01 17:52   ` Jacek Konieczny
@ 2002-08-01 18:01     ` kuznet
  2002-08-02  0:27     ` two net_device ? ??
  1 sibling, 0 replies; 4+ messages in thread
From: kuznet @ 2002-08-01 18:01 UTC (permalink / raw)
  To: Jacek Konieczny; +Cc: netdev

Hello!

> 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.

I do not understand this. It is leak and we have to find who continues
to use the device.


> And even if there is a bug

Nope. The bug is the first, the cleanup is the second.

Alexey

^ permalink raw reply	[flat|nested] 4+ messages in thread

* two net_device ?
  2002-08-01 17:52   ` Jacek Konieczny
  2002-08-01 18:01     ` kuznet
@ 2002-08-02  0:27     ` ??
  1 sibling, 0 replies; 4+ messages in thread
From: ?? @ 2002-08-02  0:27 UTC (permalink / raw)
  To: netdev

Hi, there.

I implemented 32 pseudo interface(eth1 ~ eth32) using a module.
When I up the interfaces using "ifconfig eth1 xx.xx.xx.xx" command,
there are two "eth1" interface. Before I up the interfaces, there is a "eth1" interface.
I can't find what thing goes wrong.

For test, I made just 2 pseudo interface using same mechanizm. then
above problem doesn't occur.

any suggestion, thanks..
I use 2.4.17 kernel.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-08-02  0:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
2002-08-01 18:01     ` kuznet
2002-08-02  0:27     ` two net_device ? ??

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).