Skip to content

Commit 42c46e6

Browse files
Stefano Stabellinikonradwilk
authored andcommitted
xen/xenbus: ignore console/0
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 <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
1 parent cf8e019 commit 42c46e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/xen/xenbus/xenbus_probe_frontend.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ static int xenbus_probe_frontend(struct xen_bus_type *bus, const char *type,
5353
char *nodename;
5454
int err;
5555

56+
/* ignore console/0 */
57+
if (!strncmp(type, "console", 7) && !strncmp(name, "0", 1)) {
58+
DPRINTK("Ignoring buggy device entry console/0");
59+
return 0;
60+
}
61+
5662
nodename = kasprintf(GFP_KERNEL, "%s/%s/%s", bus->root, type, name);
5763
if (!nodename)
5864
return -ENOMEM;

0 commit comments

Comments
 (0)