Skip to content

Commit

Permalink
xen/xenbus: ignore console/0
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Stefano Stabellini authored and Konrad Rzeszutek Wilk committed Mar 13, 2012
1 parent cf8e019 commit 42c46e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/xen/xenbus/xenbus_probe_frontend.c
Original file line number Diff line number Diff line change
@@ -53,6 +53,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;

0 comments on commit 42c46e6

Please sign in to comment.