lkml.org 
[lkml]   [2013]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[076/141] USB: keyspan: fix bogus array index
    3.6.11.6 stable review patch.
    If anyone has any objections, please let me know.

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

    From: Johan Hovold <jhovold@gmail.com>

    [ Upstream commit a07088098a650267b2eda689538133a324b9523f ]

    The outcont_endpoints array was indexed using the port minor number
    (which can be greater than the array size) rather than the device port
    number.

    Cc: stable@vger.kernel.org
    Signed-off-by: Johan Hovold <jhovold@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    ---
    drivers/usb/serial/keyspan.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
    index 059d44b..caf85ab 100644
    --- a/drivers/usb/serial/keyspan.c
    +++ b/drivers/usb/serial/keyspan.c
    @@ -1622,7 +1622,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
    d_details = s_priv->device_details;
    device_port = port->number - port->serial->minor;

    - outcont_urb = d_details->outcont_endpoints[port->number];
    + outcont_urb = d_details->outcont_endpoints[device_port];
    this_urb = p_priv->outcont_urb;

    dbg("%s - endpoint %d", __func__, usb_pipeendpoint(this_urb->pipe));
    --
    1.7.10.4



    \
     
     \ /
      Last update: 2013-07-03 21:41    [W:6.777 / U:0.308 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site