From: Anusha Srivatsa <asrivats@redhat.com>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>
Cc: Luca Ceresoli <luca.ceresoli@bootlin.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Anusha Srivatsa <asrivats@redhat.com>
Subject: [PATCH RFC 0/2] drm/panel: Refcounted panel allocation
Date: Wed, 12 Mar 2025 20:54:41 -0400 [thread overview]
Message-ID: <20250312-drm-panel-v1-0-e99cd69f6136@redhat.com> (raw)
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>
next reply other threads:[~2025-03-13 0:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 0:54 Anusha Srivatsa [this message]
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
2025-03-13 20:34 ` Anusha Srivatsa
2025-03-14 12:27 ` Luca Ceresoli
2025-03-14 15:21 ` Anusha Srivatsa
2025-03-13 14:42 ` Maxime Ripard
2025-03-13 20:42 ` 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
2025-03-17 10:12 ` Neil Armstrong
2025-03-17 13:45 ` Anusha Srivatsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250312-drm-panel-v1-0-e99cd69f6136@redhat.com \
--to=asrivats@redhat.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.