All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+1944765c3659f63d3777@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [dri?] general protection fault in drm_object_attach_property
Date: Mon, 17 Aug 2026 22:08:05 +0800	[thread overview]
Message-ID: <tencent_5FFFC6F412EB065749B56EC7EEC64C88E706@qq.com> (raw)
In-Reply-To: <6a829a95.dbb3a75c.20434b.0043.GAE@google.com>

#syz test

diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 11646453aaac..12f4c5fcec92 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -2175,8 +2175,12 @@ int drm_mode_create_tv_properties_legacy(struct drm_device *dev,
 	struct drm_property *tv_subconnector;
 	unsigned int i;
 
-	if (dev->mode_config.tv_select_subconnector_property)
+	if (dev->mode_config.tv_select_subconnector_property) {
+		if (num_modes && !dev->mode_config.legacy_tv_mode_property)
+			goto tv_mode;
+
 		return 0;
+	}
 
 	/*
 	 * Basic connector properties
@@ -2205,18 +2209,6 @@ int drm_mode_create_tv_properties_legacy(struct drm_device *dev,
 	if (drm_mode_create_tv_margin_properties(dev))
 		goto nomem;
 
-	if (num_modes) {
-		dev->mode_config.legacy_tv_mode_property =
-			drm_property_create(dev, DRM_MODE_PROP_ENUM,
-					    "mode", num_modes);
-		if (!dev->mode_config.legacy_tv_mode_property)
-			goto nomem;
-
-		for (i = 0; i < num_modes; i++)
-			drm_property_add_enum(dev->mode_config.legacy_tv_mode_property,
-					      i, modes[i]);
-	}
-
 	dev->mode_config.tv_brightness_property =
 		drm_property_create_range(dev, 0, "brightness", 0, 100);
 	if (!dev->mode_config.tv_brightness_property)
@@ -2247,6 +2239,19 @@ int drm_mode_create_tv_properties_legacy(struct drm_device *dev,
 	if (!dev->mode_config.tv_hue_property)
 		goto nomem;
 
+tv_mode:
+	if (num_modes) {
+		dev->mode_config.legacy_tv_mode_property =
+			drm_property_create(dev, DRM_MODE_PROP_ENUM,
+					    "mode", num_modes);
+		if (!dev->mode_config.legacy_tv_mode_property)
+			goto nomem;
+
+		for (i = 0; i < num_modes; i++)
+			drm_property_add_enum(dev->mode_config.legacy_tv_mode_property,
+					      i, modes[i]);
+	}
+
 	return 0;
 nomem:
 	return -ENOMEM;


  parent reply	other threads:[~2026-08-17 14:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17  5:22 [syzbot] [dri?] general protection fault in drm_object_attach_property syzbot
2026-08-17  9:55 ` Edward Adam Davis
2026-08-17 12:35   ` syzbot
2026-08-17 12:37 ` [PATCH] drm: Optimized by adding the TV modes attribute Edward Adam Davis
2026-08-17 12:49   ` sashiko-bot
2026-08-17 15:11     ` [PATCH v2] drm: Optimize tv properties creation Edward Adam Davis
2026-08-17 15:39   ` [PATCH] drm: Optimized by adding the TV modes attribute Ruben Wauters
2026-08-17 14:08 ` Edward Adam Davis [this message]
2026-08-17 14:29   ` [syzbot] [dri?] general protection fault in drm_object_attach_property syzbot
2026-08-17 14:48 ` Edward Adam Davis
2026-08-17 15:10   ` syzbot

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=tencent_5FFFC6F412EB065749B56EC7EEC64C88E706@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+1944765c3659f63d3777@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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.