]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
usb: xhci: fix uninitialized completion when USB3 port got wrong status
authorAaron Ma <aaron.ma@canonical.com>
Wed, 28 Nov 2018 15:29:00 +0000 (16:29 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commit7db53e7b4775c7d14a4610d11bbebaec311eb110
treef67da53fab7f316c51c3751444e12b3405829db9
parent5d3e1b772a0e1dc58d62a8857c13684482a18900
usb: xhci: fix uninitialized completion when USB3 port got wrong status

BugLink: https://bugs.launchpad.net/bugs/1805344
Realtek USB3.0 Card Reader [0bda:0328] reports wrong port status on
Cannon lake PCH USB3.1 xHCI [8086:a36d] after resume from S3,
after clear port reset it works fine.

Since this device is registered on USB3 roothub at boot,
when port status reports not superspeed, xhci_get_port_status will call
an uninitialized completion in bus_state[0].
Kernel will hang because of NULL pointer.

Restrict the USB2 resume status check in USB2 roothub to fix hang issue.

Cc: stable@vger.kernel.org
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(backported from commit 958c0bd86075d4ef1c936998deefe1947e539240)
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Acked-By: AceLan Kao <acelan.kao@canonical.com>
Acked-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/usb/host/xhci-hub.c
drivers/usb/host/xhci-ring.c