netdev
[Top] [All Lists]

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

To: Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>
Subject: Re: 2.6.7-rc3: unregister_netdevice: waiting for tun0 to become free. Usage count = 1
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Wed, 16 Jun 2004 13:09:50 -0700
Cc: herbert@xxxxxxxxxxxxxxxxxxx, schwab@xxxxxxx, netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <20040616193731.GB29781@xxxxxxxxxxxxx>
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> <20040614124402.GA28519@xxxxxxxxxxxxxxxxxxx> <20040616193731.GB29781@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Wed, 16 Jun 2004 23:37:31 +0400
Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx> wrote:

> Anyway, the comment remains damn true and the place is still
> bug. It makes sense to think about waiting for at least one quiescent
> state after detaching the stale device from dst and real dev_put() it.
> Reference to RCU is not occasional, the job looks natural for it.

It seems a simple synchronize_kernel() would clear all the
crap no?

===== net/core/dst.c 1.18 vs edited =====
--- 1.18/net/core/dst.c 2004-06-16 10:26:56 -07:00
+++ edited/net/core/dst.c       2004-06-16 13:10:37 -07:00
@@ -243,6 +243,8 @@
                        dst->ops->ifdown(dst, unregister);
        } while ((dst = dst->child) && dst->flags & DST_NOHASH &&
                 dst->dev == dev);
+
+       synchronize_kernel();
 }
 
 static int dst_dev_event(struct notifier_block *this, unsigned long event, 
void *ptr)

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