]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xen/xenbus: ignore console/0
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 13 Mar 2012 18:30:44 +0000 (18:30 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 19 Apr 2012 21:13:00 +0000 (17:13 -0400)
Unfortunately xend creates a bogus console/0 frotend/backend entry pair
on xenstore that console backends cannot properly cope with.
Any guest behavior that is not completely ignoring console/0 is going
to either cause problems with xenconsoled or qemu.
Returning 0 or -ENODEV from xencons_probe is not enough because it is
going to cause the frontend state to become 4 or 6 respectively.
The best possible thing we can do here is just ignore the entry from
xenbus_probe_frontend.

[upstream git commit 42c46e6]
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/xenbus/xenbus_probe_frontend.c

index 52f22f7a4bf8c3644fe940c4b4d71f3717a41945..364ea921e9a0240aacc86843357e9b710e699e1f 100644 (file)
@@ -52,6 +52,12 @@ static int xenbus_probe_frontend(struct xen_bus_type *bus, const char *type,
        char *nodename;
        int err;
 
+       /* ignore console/0 */
+       if (!strncmp(type, "console", 7) && !strncmp(name, "0", 1)) {
+               DPRINTK("Ignoring buggy device entry console/0");
+               return 0;
+       }
+
        nodename = kasprintf(GFP_KERNEL, "%s/%s/%s", bus->root, type, name);
        if (!nodename)
                return -ENOMEM;