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

[Xen-devel] [PATCH] rmmod xennet in dom0 crashes



netfront:netif_init() skips the register_inetaddr_notifier() and 
xenbus_register_frontend() calls if it is running in dom0 
(is_initial_xendomain()). 
netfront:netif_exit() unregisters both unconditionally.

Jim

----------
Fix "rmmod xennet" crash in dom0

Signed-off-by: Jim Dykman <dykman@xxxxxxxxxx>

diff -r 05bf8693c735 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Wed Oct 18 
16:08:58 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Wed Oct 18 
13:21:33 2006 -0400
@@ -2129,6 +2129,9 @@ module_init(netif_init);

 static void __exit netif_exit(void)
 {
+       if (is_initial_xendomain())
+               return;
+
        unregister_inetaddr_notifier(&notifier_inetdev);

        return xenbus_unregister_driver(&netfront);

Attachment: netif_exit.patch
Description: Binary data

_______________________________________________
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®.