dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH drm-misc-next 0/3] Fixes for vc4 hotplug rework
@ 2022-08-19  0:29 Danilo Krummrich
  2022-08-19  0:29 ` [PATCH drm-misc-next 1/3] drm/vc4: hdmi: unlock mutex when device is unplugged Danilo Krummrich
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Danilo Krummrich @ 2022-08-19  0:29 UTC (permalink / raw)
  To: daniel, airlied, tzimmermann, mripard
  Cc: Danilo Krummrich, linux-kernel, dri-devel

Hi,

I've found a few potential issues left after the hotplug rework.

In vc4_hdmi.c we're missing two mutex_unlock() calls when the device is
unplugged.

vc4_crtc and vc4_plane seem to miss some drm_dev_enter()/drm_dev_exit() calls
to protect against resource access after the device/driver is unbound, but the
DRM potentially isn't freed yet and userspace can still call into the driver.

Danilo Krummrich (3):
  drm/vc4: hdmi: unlock mutex when device is unplugged
  drm/vc4: plane: protect device resources after removal
  drm/vc4: crtc: protect device resources after removal

 drivers/gpu/drm/vc4/vc4_crtc.c  | 41 ++++++++++++++++++++++++++++++++-
 drivers/gpu/drm/vc4/vc4_drv.h   |  1 +
 drivers/gpu/drm/vc4/vc4_hdmi.c  |  7 ++++--
 drivers/gpu/drm/vc4/vc4_plane.c | 25 ++++++++++++++++++++
 4 files changed, 71 insertions(+), 3 deletions(-)


base-commit: 8ba9249396bef37cb68be9e8dee7847f1737db9d
-- 
2.37.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-24 19:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-19  0:29 [PATCH drm-misc-next 0/3] Fixes for vc4 hotplug rework Danilo Krummrich
2022-08-19  0:29 ` [PATCH drm-misc-next 1/3] drm/vc4: hdmi: unlock mutex when device is unplugged Danilo Krummrich
2022-08-19  0:29 ` [PATCH drm-misc-next 2/3] drm/vc4: plane: protect device resources after removal Danilo Krummrich
2022-08-19  7:26   ` Maxime Ripard
2022-08-19 11:11     ` Danilo Krummrich
2022-08-19  0:29 ` [PATCH drm-misc-next 3/3] drm/vc4: crtc: " Danilo Krummrich
2022-08-19  7:29   ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).