]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
xhci: make sure interrupts are restored to correct state
authorMathias Nyman <mathias.nyman@linux.intel.com>
Wed, 11 Dec 2019 14:20:07 +0000 (16:20 +0200)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:22:50 +0000 (14:22 -0300)
commit722fbd3e6a2ec2fe1f763d7410f98399dad1b278
tree22ab768957f699a86fcecbecd2fd16305a83ca0b
parentc134e84d59fa8102d4e6a3ac88d03dba0cf24bc2
xhci: make sure interrupts are restored to correct state

BugLink: https://bugs.launchpad.net/bugs/1857158
[ Upstream commit bd82873f23c9a6ad834348f8b83f3b6a5bca2c65 ]

spin_unlock_irqrestore() might be called with stale flags after
reading port status, possibly restoring interrupts to a incorrect
state.

If a usb2 port just finished resuming while the port status is read
the spin lock will be temporary released and re-acquired in a separate
function. The flags parameter is passed as value instead of a pointer,
not updating flags properly before the final spin_unlock_irqrestore()
is called.

Cc: <stable@vger.kernel.org> # v3.12+
Fixes: 8b3d45705e54 ("usb: Fix xHCI host issues on remote wakeup.")
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20191211142007.8847-7-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/usb/host/xhci-hub.c