]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
USB: serial: keyspan: handle unbound ports
authorJohan Hovold <johan@kernel.org>
Fri, 17 Jan 2020 09:50:25 +0000 (10:50 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit8e3c8e8d4098f5c6fc48bef7943afedd87dd612c
tree045589d7c6a809d6151b81774d5b773a05b8e25a
parent6b8163786b8f89ec448fa4ed7720df22254b2ff3
USB: serial: keyspan: handle unbound ports

BugLink: https://bugs.launchpad.net/bugs/1862259
commit 3018dd3fa114b13261e9599ddb5656ef97a1fa17 upstream.

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()).

Fixes: 0ca1268e109a ("USB Serial Keyspan: add support for USA-49WG & USA-28XG")
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/serial/keyspan.c