Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > ea32411352494358b8d75a78402a4713 > files > 4994

kernel-2.6.18-238.19.1.el5.centos.plus.src.rpm

From: Laszlo Ersek <lersek@redhat.com>
Date: Mon, 6 Dec 2010 16:54:17 -0500
Subject: [virt] xen: fix netback hotplug regression in xenbus fix
Message-id: <1291654457-18492-1-git-send-email-lersek@redhat.com>
Patchwork-id: 4522
O-Subject: [kernel team] [RHEL5.6 PATCH] fix netback hotplug regression caused
	by xenbus transition fix (BZ#635999)
Bugzilla: 635999
RH-Acked-by: Andrew Jones <drjones@redhat.com>

Ian Campbell pointed out a problem in the upstream version [0] of the
BZ#635999 patch [1]. That patch modified the netback state actions only
to unify them with blkback/blktap; the change was not necessary from a
security POV -- as written earlier [2], I couldn't reproduce the BZ with
netback.

Unfortunately, the change introduced spurious hotplug events and delayed
the final "up" phase.

This patch for kernel-2.6.18-235.el5 removes the offending call. The
remaining netback parts of the original patch (which were only
refactoring) are not reverted, after discussing them with upstream. I
sent this patch to upstream in private like the predecessor patch; Ian
Campbell okayed it.

Please review. Thanks.

[0] http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/59f097ef181b
[1] http://git.engineering.redhat.com/?p=users/jwilson/rhel5/kernel;a=commitdiff;h=cfce64ff78e16640201bf27f01970d86904bdcd8
[2] <1290448552-11315-1-git-send-email-lersek@redhat.com>

Signed-off-by: Laszlo Ersek <lersek@redhat.com>

diff --git a/drivers/xen/netback/xenbus.c b/drivers/xen/netback/xenbus.c
index 9ef2fa7..090340e 100644
--- a/drivers/xen/netback/xenbus.c
+++ b/drivers/xen/netback/xenbus.c
@@ -223,11 +223,7 @@ static void frontend_changed(struct xenbus_device *dev,
 		break;
 
 	case XenbusStateConnected:
-		/* Enforce precondition before potential leak point.
-		 * netback_disconnect() is idempotent.
-		 */
-		netback_disconnect(be);
-
+		/* backend_create_netif() is idempotent */
 		backend_create_netif(be);
 		if (be->netif)
 			connect(be);