|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
Re: [Xen-devel] Re: [patch] netfront: unregister net device at	backend_c
 
> 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
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread>
 |  
- Re: [Xen-devel] Re: [patch] netfront: unregister net device at	backend_changed() if network_connect() failed,
Joe Jin <=
 
 
 |  
  
 | 
    | 
  
  
    |   | 
    |