drm/nouveau: Fix deadlocks in nouveau_connector_detect()
Lyude Paul authored
commit 3e1a1275 upstream.

When we disable hotplugging on the GPU, we need to be able to
synchronize with each connector's hotplug interrupt handler before the
interrupt is finally disabled. This can be a problem however, since
nouveau_connector_detect() currently grabs a runtime power reference
when handling connector probing. This will deadlock the runtime suspend
handler like so:

[  861.480896] INFO: task kworker/0:2:61 blocked for more than 120 seconds.
[  861.483290]       Tainted: G           O      4.18.0-rc6Lyude-Test+ #1
[  861.485158] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  861.486332] kworker/0:2     D    0    61      2 0x80000000
[  861.487044] Workqueue: events nouveau_display_hpd_work [nouveau]
[  861.487737] Call Trace:
[  861.488394]  __schedule+0x322/0xaf0
[  861.489070]  schedule+0x33/0x90
[  861.489744]  rpm_resume+0x19c/0x850
[  861.490392]  ? finish_wait+0x90/...
86393a7e
Name Last commit Last update
Documentation kbuild: verify that $DEPMOD is installed
LICENSES LICENSES: Add Linux-OpenIB license text
arch crypto: x86/aegis,morus - Do not require OSXSAVE for SSE2
block blk-mq: avoid to synchronize rcu inside blk_cleanup_queue()
certs Replace magic for trusting the secondary keyring with #define
crypto evm: Don't deadlock if a crypto algorithm is unavailable
drivers drm/nouveau: Fix deadlocks in nouveau_connector_detect()
firmware kbuild: remove all dummy assignments to obj-
fs ocfs2: fix ocfs2 read block panic
include Revert "uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name"
init init: rename and re-order boot_cpu_state_init()
ipc ipc/shm.c add ->pagesize function to shm_vm_ops
kernel bpf/verifier: disallow pointer subtraction
lib debugobjects: Make stack check warning more informative
mm mm: shmem.c: Correctly annotate new inodes for lockdep
net NFC: Fix possible memory corruption when handling SHDLC I-Frame commands
samples samples/bpf: all XDP samples should unload xdp/bpf prog on SIGTERM
scripts kbuild: add .DELETE_ON_ERROR special target
security Revert "uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name"
sound ALSA: oxfw: fix memory leak of private data
tools selftest: timers: Tweak raw_skew to SKIP when ADJ_OFFSET/other clock adjustments are in progress
usr kbuild: rename built-in.o to built-in.a
virt KVM: arm/arm64: Fix vgic init race
.clang-format clang-format: add configuration file
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Add hch to .get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files
.gitignore Merge tag 'kbuild-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
.mailmap Merge branch 'asoc-4.17' into asoc-4.18 for compress dependencies
COPYING COPYING: use the new text with points to the license files
CREDITS MAINTAINERS/CREDITS: Drop METAG ARCHITECTURE
Kbuild Merge tag 'kbuild-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Kconfig kconfig: add basic helper macros to scripts/Kconfig.include
MAINTAINERS MAINTAINERS: GDB: update e-mail address
Makefile Linux 4.18.10
README Docs: Added a pointer to the formatted docs to README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.