[3.8.y.z extended stable] Patch "xen-netback: transition to CLOSED when removing a VIF" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Fri Nov 8 17:55:52 UTC 2013


This is a note to let you know that I have just added a patch titled

    xen-netback: transition to CLOSED when removing a VIF

to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue

This patch is scheduled to be released in version 3.8.13.13.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.8.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From f9a8d8c3d224859031296736ee40b3dbfd3eff0c Mon Sep 17 00:00:00 2001
From: David Vrabel <david.vrabel at citrix.com>
Date: Mon, 7 Oct 2013 13:55:19 +0100
Subject: xen-netback: transition to CLOSED when removing a VIF

commit dc62ccaccfb139d9b04bbc5a2688a4402adbfab3 upstream.

If a guest is destroyed without transitioning its frontend to CLOSED,
the domain becomes a zombie as netback was not grant unmapping the
shared rings.

When removing a VIF, transition the backend to CLOSED so the VIF is
disconnected if necessary (which will unmap the shared rings etc).

This fixes a regression introduced by
279f438e36c0a70b23b86d2090aeec50155034a9 (xen-netback: Don't destroy
the netdev until the vif is shut down).

Signed-off-by: David Vrabel <david.vrabel at citrix.com>
Cc: Ian Campbell <ian.campbell at citrix.com>
Cc: Wei Liu <wei.liu2 at citrix.com>
Cc: Paul Durrant <Paul.Durrant at citrix.com>
Acked-by: Wei Liu <wei.liu2 at citrix.com>
Reviewed-by:  Paul Durrant <paul.durrant at citrix.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 drivers/net/xen-netback/xenbus.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index 805a0a3..8a9e875 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -39,11 +39,15 @@ static int connect_rings(struct backend_info *);
 static void connect(struct backend_info *);
 static void backend_create_xenvif(struct backend_info *be);
 static void unregister_hotplug_status_watch(struct backend_info *be);
+static void set_backend_state(struct backend_info *be,
+			      enum xenbus_state state);

 static int netback_remove(struct xenbus_device *dev)
 {
 	struct backend_info *be = dev_get_drvdata(&dev->dev);

+	set_backend_state(be, XenbusStateClosed);
+
 	unregister_hotplug_status_watch(be);
 	if (be->vif) {
 		kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
--
1.8.1.2





More information about the kernel-team mailing list