xenbus: Fix loopback event channel assuming domain 0
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Thu, 13 Oct 2011 20:07:07 +0000 (16:07 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 14 Oct 2011 13:25:17 +0000 (09:25 -0400)
The xenbus event channel established in xenbus_init is intended to be a
loopback channel, but the remote domain was hardcoded to 0; this will
cause the channel to be unusable when xenstore is not being run in
domain 0.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Reviewed-by: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/xenbus/xenbus_probe.c

index 739769551e33b98e983b2a76369051b9e2915557..d5347fe158821ddb9237736268ae220ae005f0f5 100644 (file)
@@ -724,7 +724,7 @@ static int __init xenbus_init(void)
 
                /* Next allocate a local port which xenstored can bind to */
                alloc_unbound.dom        = DOMID_SELF;
-               alloc_unbound.remote_dom = 0;
+               alloc_unbound.remote_dom = DOMID_SELF;
 
                err = HYPERVISOR_event_channel_op(EVTCHNOP_alloc_unbound,
                                                  &alloc_unbound);