[Top] [All Lists]

Re: 2.6.7-rc3: unregister_netdevice: waiting for tun0 to become free. Us

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: Re: 2.6.7-rc3: unregister_netdevice: waiting for tun0 to become free. Usage count = 1
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 14 Jun 2004 22:44:02 +1000
Cc: schwab@xxxxxxx, netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx, kuznet@xxxxxxxxxxxxx
In-reply-to: <20040614102858.GA12343@xxxxxxxxxxxxxxxxxxx>
References: <20040613121514.6b3c1c8a.davem@xxxxxxxxxx> <E1BZeW1-0008Ny-00@xxxxxxxxxxxxxxxxxxxxxxxx> <20040613234142.GA32329@xxxxxxxxxxxxxxxxxxx> <20040613183622.3a814506.davem@xxxxxxxxxx> <20040614015013.GA11048@xxxxxxxxxxxxxxxxxxx> <20040613210725.70dbd016.davem@xxxxxxxxxx> <20040614042216.GA28669@xxxxxxxxxxxxxxxxxxx> <20040614102858.GA12343@xxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/
On Mon, Jun 14, 2004 at 08:28:58PM +1000, herbert wrote:
> On Mon, Jun 14, 2004 at 02:22:16PM +1000, herbert wrote:
> > 
> > 1. The code in dst_dev_event relies on the entries with dev in it
> > getting onto the garbage list before it is called.  Unfortunately
> > for routing entries, the flushing is done asynchronusly so it is
> > entirely possible for the entries to get onto the garbage list after
> > dst_dev_event has been called twice (DOWN and then UNREGISTER).
> Actually this can't happen since fib_netdev_event will do an
> immediate flush.  So it's only #2 or IPsec that's a problem.

And even there it's not too bad as it only happens if there are
more than two IPsec dst's in a row, e.g., ESP/IPCOMP.

Here is a patch to do the same loopback_dev hack for child dst's.
I've also taken the liberty to remove the bogus dst->output check.
I've tested it with ESP/IPCOMP and I can confirm that it allows
me to remove my NIC module if when I've got a TCP connection over
it.  Without it the removal hangs.

Alexey, if I've missed any subtle piece of logic there, please
scream :)

Visit Openswan at
Email:  Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page:
PGP Key:

Attachment: p
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>