[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

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.

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



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.