public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] drm/panel: Refcounted panel allocation
@ 2025-03-13  0:54 Anusha Srivatsa
  2025-03-13  0:54 ` [PATCH RFC 1/2] drm/panel: Add new helpers for refcounted panel allocatons Anusha Srivatsa
  2025-03-13  0:54 ` [PATCH RFC 2/2] drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc() Anusha Srivatsa
  0 siblings, 2 replies; 8+ messages in thread
From: Anusha Srivatsa @ 2025-03-13  0:54 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: Luca Ceresoli, dri-devel, linux-kernel, Anusha Srivatsa

Primary motivation is to avoid havig a dangling pointer with panels.
In a scenario where panel device no longer exists, the DRM driver
has no idea of it. It can continue to try and access a panel leading
to use-after-free situations.
This is the initial draft more for feedback only. Once the path
forward is clear, further drivers will be converted to using the API.

Suggested-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
Anusha Srivatsa (2):
      drm/panel: Add new helpers for refcounted panel allocatons
      drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()

 drivers/gpu/drm/drm_panel.c          | 50 +++++++++++++++++++++++++++++++
 drivers/gpu/drm/panel/panel-simple.c |  4 +--
 include/drm/drm_panel.h              | 58 ++++++++++++++++++++++++++++++++++++
 3 files changed, 109 insertions(+), 3 deletions(-)
---
base-commit: 3282422bf251db541fe07c548ca304130d37d754
change-id: 20250311-drm-panel-c327992e932e

Best regards,
-- 
Anusha Srivatsa <asrivats@redhat.com>


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

end of thread, other threads:[~2025-03-17 10:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-13  0:54 [PATCH RFC 0/2] drm/panel: Refcounted panel allocation Anusha Srivatsa
2025-03-13  0:54 ` [PATCH RFC 1/2] drm/panel: Add new helpers for refcounted panel allocatons Anusha Srivatsa
2025-03-13 10:09   ` Luca Ceresoli
2025-03-13 14:34     ` Maxime Ripard
     [not found]     ` <CAN9Xe3TeKTZtcMPtae7h33H=B-veGW93z8nMpHK+pEuNdh4=2A@mail.gmail.com>
2025-03-14 12:27       ` Luca Ceresoli
2025-03-13 14:42   ` Maxime Ripard
2025-03-13  0:54 ` [PATCH RFC 2/2] drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc() Anusha Srivatsa
2025-03-17 10:12   ` Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox