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: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Jun 2004 07:29:09 +1000
Cc: "David S. Miller" <davem@xxxxxxxxxx>, schwab@xxxxxxx, netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <20040617190739.GB10925@xxxxxxxxxxxxx>
References: <20040616193731.GB29781@xxxxxxxxxxxxx> <20040616130950.6aadde3c.davem@xxxxxxxxxx> <20040616203748.GA30675@xxxxxxxxxxxxx> <20040616134711.499209c9.davem@xxxxxxxxxx> <20040617081722.GA8559@xxxxxxxxxxxxxxxxxxx> <20040617083303.GA8810@xxxxxxxxxxxxxxxxxxx> <20040617101016.44512cb1.davem@xxxxxxxxxx> <20040617172449.GA10303@xxxxxxxxxxxxx> <20040617105324.554c631b.davem@xxxxxxxxxx> <20040617190739.GB10925@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.5.1+cvs20040105i
On Thu, Jun 17, 2004 at 11:07:39PM +0400, Alexey Kuznetsov wrote:
> 
> >                                              and that we need to
> > add another call in unregister_netdevice() right before final dev_put().
> 
> This should be enough.

It is enough for this dst case, but it may not be enough in general.

Other event handlers may need a rebroadcast before they drop the dev
reference.  So we really should do the synchronize_net() before
freeing the device in net_run_todo().

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email:  Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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