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

Re: [Xen-devel] Re: [patch] netfront: unregister net device at backend_changed() if network_connect() failed



> My point is, if you unregister_netdev() on failed network_connect(), and
> then do it unconditionally again in netfront_remove(), you will BUG_ON() in
> unregister_netdevice().

Sorry I dont notice that
Could we add a test in netfront_remove like below?
static int __devexit netfront_remove(struct xenbus_device *dev)
{
<--snip-->
      if (info->netdev->reg_state == NETREG_REGISTERED)
           unregister_netdev(info->netdev);
<--snip-->
}

This will avoid the crash when call netfront_remove.

Thanks,
Joe


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


 


Rackspace

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