Re: [PATCH usb-linus] USB: keyspan: fix typo causing GPF on open

From: Richard
Date: Sat Nov 10 2012 - 20:27:50 EST


BjÃrn:

I patched keyspan.c using your below supplied diff in 3.6.6 (I'm not
using git.) The patch WORKS for me. (I tested using minicom and the
two programs that usually access the Keyspan serial device.)

Thank you for the quick fix.

Will this show up in 3.6.7?

Richard
richjunk@xxxxxxxxxxx


On 11/10/2012 01:13 AM, BjÃrn Mork wrote:
> Commit f79b2d0f (USB: keyspan: fix NULL-pointer dereferences and
> memory leaks) had a small typo which made the driver use wrong
> offsets when mapping serial port private data. This results in
> in a GPF when the port is opened.
>
> Reported-by: Richard <richjunk@xxxxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx>
> Cc: Johan Hovold <jhovold@xxxxxxxxx>
> Signed-off-by: BjÃrn Mork <bjorn@xxxxxxx>
> ---
> Hello Richard,
>
> I wonder if you are able to test and verify this? I do not guarantee
> that there aren't other issues around, but this small typo looked like
> an obvious killer...
>
> BjÃrn
>
> drivers/usb/serial/keyspan.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
> index 7179b0c..cff8dd5 100644
> --- a/drivers/usb/serial/keyspan.c
> +++ b/drivers/usb/serial/keyspan.c
> @@ -2430,7 +2430,7 @@ static void keyspan_release(struct usb_serial *serial)
> static int keyspan_port_probe(struct usb_serial_port *port)
> {
> struct usb_serial *serial = port->serial;
> - struct keyspan_port_private *s_priv;
> + struct keyspan_serial_private *s_priv;
> struct keyspan_port_private *p_priv;
> const struct keyspan_device_details *d_details;
> struct callbacks *cback;
> @@ -2445,7 +2445,6 @@ static int keyspan_port_probe(struct usb_serial_port *port)
> if (!p_priv)
> return -ENOMEM;
>
> - s_priv = usb_get_serial_data(port->serial);
> p_priv->device_details = d_details;
>
> /* Setup values for the various callback routines */
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/