patch "USB: serial: keyspan: handle unbound ports" added to usb-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
USB: serial: keyspan: handle unbound ports
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 3018dd3fa114b13261e9599ddb5656ef97a1fa17 Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Fri, 17 Jan 2020 10:50:25 +0100
Subject: USB: serial: keyspan: handle unbound ports
Check for NULL port data in the control URB completion handlers to avoid dereferencing a NULL pointer in the unlikely case where a port device isn't bound to a driver (e.g. after an allocation failure on port probe()).
--- drivers/usb/serial/keyspan.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/serial/keyspan.c +4 -0
@@ -1058,6 +1058,8 @@ static void usa49_glocont_callback(struct urb *urb)for (i =0 ; i < serial->num_ports; ++i) { port = serial->port[i]; p_priv =usb_get_serial_port_data (port); +if (!p_priv) +continue ;if (p_priv->resend_cont) {dev_dbg (&port->dev,"%s - sending setup\n" , __func__);
@@ -1459,6 +1461,8 @@ static void usa67_glocont_callback(struct urb *urb)for (i =0 ; i < serial->num_ports; ++i) { port = serial->port[i]; p_priv =usb_get_serial_port_data (port); +if (!p_priv) +continue ;if (p_priv->resend_cont) {dev_dbg (&port->dev,"%s - sending setup\n" , __func__);
Signature · 1 line
2.25.0