public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/kmscon] rawhide: kmscon: Fix crash when a drm plane has no properties
@ 2026-10-05 8:32 Jocelyn Falempe
0 siblings, 0 replies; only message in thread
From: Jocelyn Falempe @ 2026-10-05 8:32 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/kmscon
Branch : rawhide
Commit : b36697a7985e66d91aa8c1b861c889052c4ca9ac
Author : Jocelyn Falempe <jfalempe@redhat.com>
Date : 2026-10-05T10:31:25+02:00
Stats : +44/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/kmscon/c/b36697a7985e66d91aa8c1b861c889052c4ca9ac?branch=rawhide
Log:
kmscon: Fix crash when a drm plane has no properties
This can occur with kernel 7.3 and newer.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
---
diff --git a/drm_shared-Fix-crash-if-a-plane-has-no-properties.patch b/drm_shared-Fix-crash-if-a-plane-has-no-properties.patch
new file mode 100644
index 0000000..b533750
--- /dev/null
+++ b/drm_shared-Fix-crash-if-a-plane-has-no-properties.patch
@@ -0,0 +1,42 @@
+From 77e6ced76709fc53ee1d9c9368d62ff65d971f26 Mon Sep 17 00:00:00 2001
+From: Jocelyn Falempe <jfalempe@redhat.com>
+Date: Sat, 3 Oct 2026 00:28:01 +0200
+Subject: [PATCH] drm_shared: Fix crash if a plane has no properties
+
+When testing newer kernel 7.3.0, it can happen that a plane has no
+properties at all.
+Check that there are properties before iterating on them.
+
+Also fix the same problem for the cursor plane
+
+Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
+---
+ src/video/drm_shared.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/video/drm_shared.c b/src/video/drm_shared.c
+index e4fd870..bb5c3f7 100644
+--- a/src/video/drm_shared.c
++++ b/src/video/drm_shared.c
+@@ -255,6 +255,9 @@ static int modeset_find_plane(int fd, struct display *disp)
+ drmModeObjectPropertiesPtr props =
+ drmModeObjectGetProperties(fd, plane_id, DRM_MODE_OBJECT_PLANE);
+
++ if (!props)
++ continue;
++
+ plane_type = get_property_value(fd, props, "type");
+ if (!found_primary && plane_type == DRM_PLANE_TYPE_PRIMARY) {
+ found_primary = true;
+@@ -311,7 +314,7 @@ static void modeset_clear_cursor(drmModeAtomicReq *req, int fd)
+ }
+ drmModeObjectPropertiesPtr props =
+ drmModeObjectGetProperties(fd, plane_id, DRM_MODE_OBJECT_PLANE);
+- if (get_property_value(fd, props, "type") == DRM_PLANE_TYPE_CURSOR) {
++ if (props && get_property_value(fd, props, "type") == DRM_PLANE_TYPE_CURSOR) {
+ uint32_t prop_id = get_property_id(fd, props, "CRTC_ID");
+
+ if (drmModeAtomicAddProperty(req, plane_id, prop_id, 0) < 0)
+--
+2.55.0
+
diff --git a/kmscon.spec b/kmscon.spec
index 22b023b..2aa7359 100644
--- a/kmscon.spec
+++ b/kmscon.spec
@@ -33,6 +33,8 @@ Recommends: (kmscon-freetype if freetype)
# Upstream patch to prevent running kmscon.service when VTs are enabled
Patch1: systemd-prevent-kmscon.service-to-run-if-dev-tty0-is.patch
+# Upstream patch, prevent crash on kernel 7.3+
+Patch2: drm_shared-Fix-crash-if-a-plane-has-no-properties.patch
%description
Kmscon is a simple terminal emulator based on linux kernel mode setting (KMS).
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-05 8:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-05 8:32 [rpms/kmscon] rawhide: kmscon: Fix crash when a drm plane has no properties Jocelyn Falempe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox