Commit d199c96d authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

USB: prevent buggy hubs from crashing the USB stack

If anyone comes across a high-speed hub that (by mistake or by design)
claims to have no Transaction Translators, plugging a full- or
low-speed device into it will cause the USB stack to crash.  This
patch (as1446) prevents the problem by ignoring such devices, since
the kernel has no way to communicate with them.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Tested-by: default avatarPerry Neben <neben@vmware.com>
CC: <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6d86d52a
...@@ -2753,6 +2753,11 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, ...@@ -2753,6 +2753,11 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
udev->ttport = hdev->ttport; udev->ttport = hdev->ttport;
} else if (udev->speed != USB_SPEED_HIGH } else if (udev->speed != USB_SPEED_HIGH
&& hdev->speed == USB_SPEED_HIGH) { && hdev->speed == USB_SPEED_HIGH) {
if (!hub->tt.hub) {
dev_err(&udev->dev, "parent hub has no TT\n");
retval = -EINVAL;
goto fail;
}
udev->tt = &hub->tt; udev->tt = &hub->tt;
udev->ttport = port1; udev->ttport = port1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment