drm/nouveau: Use drm_connector_list_iter_* for iterating connectors
authorLyude Paul <lyude@redhat.com>
Fri, 13 Jul 2018 17:06:32 +0000 (13:06 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 16 Jul 2018 07:59:59 +0000 (17:59 +1000)
commit22b76bbe089cd901f5260ecb9a3dc41f9edb97a0
tree46cc6c81edf814a1cff1f5c06a328e9db822d4b3
parent7f073d011f93e92d4d225526b9ab6b8b0bbd6613
drm/nouveau: Use drm_connector_list_iter_* for iterating connectors

Every codepath in nouveau that loops through the connector list
currently does so using the old method, which is prone to race
conditions from MST connectors being created and destroyed. This has
been causing a multitude of problems, including memory corruption from
trying to access connectors that have already been freed!

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
Cc: Karol Herbst <karolherbst@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_backlight.c
drivers/gpu/drm/nouveau/nouveau_connector.c
drivers/gpu/drm/nouveau/nouveau_connector.h
drivers/gpu/drm/nouveau/nouveau_display.c