lkml.org 
[lkml]   [2011]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 011/173] USB: prevent buggy hubs from crashing the USB stack
    2.6.27.59-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Alan Stern <stern@rowland.harvard.edu>

    commit d199c96d41d80a567493e12b8e96ea056a1350c1 upstream.

    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: Alan Stern <stern@rowland.harvard.edu>
    Tested-by: Perry Neben <neben@vmware.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/usb/core/hub.c | 5 +++++
    1 file changed, 5 insertions(+)

    --- a/drivers/usb/core/hub.c
    +++ b/drivers/usb/core/hub.c
    @@ -2683,6 +2683,11 @@ hub_port_init (struct usb_hub *hub, stru
    udev->ttport = hdev->ttport;
    } else if (udev->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->ttport = port1;
    }



    \
     
     \ /
      Last update: 2011-04-25 23:05    [W:0.022 / U:1.844 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site