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

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] rmmod xennet in dom0 crashes
From: James Dykman <dykman@xxxxxxxxxx>
Date: Wed, 18 Oct 2006 14:03:01 -0400
Delivery-date: Wed, 18 Oct 2006 11:03:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] rmmod xennet in dom0 crashes, James Dykman <=