]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: Keep malloc references to MST ports
authorLyude Paul <lyude@redhat.com>
Fri, 11 Jan 2019 00:53:37 +0000 (19:53 -0500)
committerLyude Paul <lyude@redhat.com>
Fri, 11 Jan 2019 01:38:25 +0000 (20:38 -0500)
commitc5719ccf5a5f241fa8adb740a1ea7cf4ec5cbbaa
tree295b49d5c71ae7373120e4b91a84e1060f346b61
parent0bab861d99c621fe959c5a9b26bfd3a96ee1ed35
drm/nouveau: Keep malloc references to MST ports

Now that we finally have a sane way to keep port allocations around, use
it to fix the potential unchecked ->port accesses that nouveau makes by
making sure we keep the mst port allocated for as long as it's
drm_connector is accessible.

Additionally, now that we've guaranteed that mstc->port is allocated for
as long as we keep mstc around we can remove the connector registration
checks for codepaths which release payloads, allowing us to release
payloads on active topologies properly. These registration checks were
only required before in order to avoid situations where mstc->port could
technically be pointing at freed memory.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@redhat.com>
Cc: Jerry Zuo <Jerry.Zuo@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Juston Li <juston.li@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190111005343.17443-15-lyude@redhat.com
drivers/gpu/drm/nouveau/dispnv50/disp.c