From: Ruben Wauters <rubenru09@aol.com>
To: Edward Adam Davis <eadavis@qq.com>,
syzbot+1944765c3659f63d3777@syzkaller.appspotmail.com
Cc: airlied@gmail.com, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, simona@ffwll.ch,
syzkaller-bugs@googlegroups.com, tzimmermann@suse.de
Subject: Re: [PATCH] drm: Optimized by adding the TV modes attribute
Date: Mon, 17 Aug 2026 16:39:23 +0100 [thread overview]
Message-ID: <5c34319974b4968841f7e1a700643b6d626b2747.camel@aol.com> (raw)
In-Reply-To: <tencent_C6A625E0BAF4BB77334C9E0F1B244B7B1B08@qq.com>
[-- Attachment #1: Type: text/plain, Size: 2760 bytes --]
On Mon, 2026-08-17 at 20:37 +0800, Edward Adam Davis wrote:
> When adding gud properties for drm connector within the function
> gud_connector_add_properties(), if the TV modes property is not added
> first, drm_mode_create_tv_properties_legacy() would fail to add the TV
> modes property because the tv_select_subconnector_property has already
> been added.
>
> This causes gud_connector_property_lookup() to fail when looking for
> the TV modes property (returning NULL), which subsequently triggers
> issue [1] when a NULL property is passed to drm_object_attach_property().
>
> The fix ensures that within drm_mode_create_tv_properties_legacy(), the
> TV modes property is correctly added regardless of whether the subconnector
> property exists.
>
> [1]
> Oops: general protection fault, probably for non-canonical address 0xdffffc000000000c: 0000 [#1] SMP KASAN NOPTI
> KASAN: null-ptr-deref in range [0x0000000000000060-0x0000000000000067]
> RIP: 0010:drm_object_attach_property+0x85/0x3b0 drivers/gpu/drm/drm_mode_object.c:240
> Call Trace:
> gud_connector_add_properties drivers/gpu/drm/gud/gud_connector.c:572 [inline]
> gud_connector_create drivers/gpu/drm/gud/gud_connector.c:680 [inline]
> gud_get_connectors+0x86e/0x1700 drivers/gpu/drm/gud/gud_connector.c:717
> gud_probe+0x17aa/0x1c20 drivers/gpu/drm/gud/gud_drv.c:635
>
> Fixes: f453ba046074 ("DRM: add mode setting support")
> Reported-by: syzbot+1944765c3659f63d3777@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=1944765c3659f63d3777
> Tested-by: syzbot+1944765c3659f63d3777@syzkaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Acked-by: Ruben Wauters <rubenru09@aol.com>
> ---
> drivers/gpu/drm/drm_connector.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 11646453aaac..ecbbc967f51f 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 other;
> +
> return 0;
> + }
>
> /*
> * Basic connector properties
> @@ -2199,6 +2203,7 @@ int drm_mode_create_tv_properties_legacy(struct drm_device *dev,
> goto nomem;
> dev->mode_config.tv_subconnector_property = tv_subconnector;
>
> +other:
> /*
> * Other, TV specific properties: margins & TV modes.
> */
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 870 bytes --]
next prev parent reply other threads:[~2026-08-17 15:39 UTC|newest]
Thread overview: 9+ 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 15:39 ` Ruben Wauters [this message]
2026-08-17 14:08 ` [syzbot] [dri?] general protection fault in drm_object_attach_property Edward Adam Davis
2026-08-17 14:29 ` 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=5c34319974b4968841f7e1a700643b6d626b2747.camel@aol.com \
--to=rubenru09@aol.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=syzbot+1944765c3659f63d3777@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®