WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Unmatched decrementing of net device reference c

To: gcosta@xxxxxxxxxx (Glauber de Oliveira Costa)
Subject: Re: [Xen-devel] [PATCH] Unmatched decrementing of net device reference count
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 20 Dec 2006 10:58:22 +1100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 19 Dec 2006 15:58:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20061219153755.GD19551@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Core
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.6.17-rc4 (i686))
Glauber de Oliveira Costa <gcosta@xxxxxxxxxx> wrote:
> 
> This bug was found when heavy stressing the netfront 
> attach/detach mechanism with the following script:
> 
>   for i in $(seq 200); 
>   do 
>     xm network-attach <domid>;  
>     xm network-detach <domid> $i;
>   done
> 
> Guest kernel shows the following messages:
> 
> unregister_netdevice: waiting for eth1 to become free. Usage count = -1
> 
> After this patch, it ran okay in multiple iterations

Could you please use in-line patches? It's much easier to comment on.

Your patch description doesn't make sense.  unregister_netdev()
cannot possibly cause the device to be freed.  Otherwise the
subsequent free_netdev() call which you kept would be wrong.

So most likely what's happening is that free_netdev() is occuring
without a preceding unregister_netdev(), which implies that there
is a bug in the frontend state transition.

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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel