]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
USB: chipidea: fix interrupt deadlock
authorJohan Hovold <johan@kernel.org>
Thu, 21 Oct 2021 08:34:47 +0000 (10:34 +0200)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:13 +0000 (09:48 +0100)
commit2ef59bc71747bcb9321eb13766671e8c2879879a
tree988ba21a9a6a8d62de1fdc9f60635c68449b3f3c
parentd24629f271fcda1fe1fbeae469d761d0a4f7ac79
USB: chipidea: fix interrupt deadlock

BugLink: https://bugs.launchpad.net/bugs/1951822
commit 9aaa81c3366e8393a62374e3a1c67c69edc07b8a upstream.

Chipidea core was calling the interrupt handler from non-IRQ context
with interrupts enabled, something which can lead to a deadlock if
there's an actual interrupt trying to take a lock that's already held
(e.g. the controller lock in udc_irq()).

Add a wrapper that can be used to fake interrupts instead of calling the
handler directly.

Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect")
Fixes: 876d4e1e8298 ("usb: chipidea: core: add wakeup support for extcon")
Cc: Peter Chen <peter.chen@kernel.org>
Cc: stable@vger.kernel.org # 4.4
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20211021083447.20078-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/usb/chipidea/core.c