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 linux-2.6.18-xen] make netloop permanent

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH linux-2.6.18-xen] make netloop permanent
From: Laszlo Ersek <lersek@xxxxxxxxxx>
Date: Thu, 09 Dec 2010 12:21:22 +0100
Delivery-date: Thu, 09 Dec 2010 03:20:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6
Hi,

with reference to RH BZ#567540 [0], this patch makes the netloop module 
permanent (like netback is currently). It reverts parts of xen-unstable c/s 
9019:271cb04a4f2b [1] [2] (though that has a typo: "__init clean_loopback", so 
it was probably changed later too).

The patch fixes the problem of "rmmod netloop" hanging, resulting in blocked 
tasks and inability to shut down cleanly:

... kernel: unregister_netdevice: waiting for veth4 to become free. Usage count 
= 1

The problem was also reported for Debian [3] and on the Fedora-xen mailing list 
[4].

Thanks for considering,
lacos

[0] https://bugzilla.redhat.com/show_bug.cgi?id=567540
[1] http://lists.xensource.com/archives/html/xen-devel/2006-02/msg01033.html
[2] http://xenbits.xensource.com/xen-unstable.hg?rev/271cb04a4f2b
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=425703
[4] http://www.redhat.com/archives/fedora-xen/2007-April/msg00074.html

diff -r 4d8ca2afea93 drivers/xen/netback/loopback.c
--- a/drivers/xen/netback/loopback.c    Tue Dec 07 18:35:16 2010 +0000
+++ b/drivers/xen/netback/loopback.c    Wed Dec 08 18:27:41 2010 +0100
@@ -290,23 +290,6 @@
        return err;
 }
 
-static void __exit clean_loopback(int i)
-{
-       struct net_device *dev1, *dev2;
-       char dev_name[IFNAMSIZ];
-
-       sprintf(dev_name, "vif0.%d", i);
-       dev1 = dev_get_by_name(dev_name);
-       sprintf(dev_name, "veth%d", i);
-       dev2 = dev_get_by_name(dev_name);
-       if (dev1 && dev2) {
-               unregister_netdev(dev2);
-               unregister_netdev(dev1);
-               free_netdev(dev2);
-               free_netdev(dev1);
-       }
-}
-
 static int __init loopback_init(void)
 {
        int i, err = 0;
@@ -323,14 +306,4 @@
 
 module_init(loopback_init);
 
-static void __exit loopback_exit(void)
-{
-       int i;
-
-       for (i = nloopbacks; i-- > 0; )
-               clean_loopback(i);
-}
-
-module_exit(loopback_exit);
-
 MODULE_LICENSE("Dual BSD/GPL");

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH linux-2.6.18-xen] make netloop permanent, Laszlo Ersek <=