From: Oarora Etimis <oaroraetimis@gmail.com>
To: Sebastian Wick <sebastian.wick@redhat.com>
Cc: Maxime Ripard <mripard@kernel.org>,
Louis Chauvet <louis.chauvet@bootlin.com>,
Simona Vetter <simona@ffwll.ch>,
Melissa Wen <melissa.srw@gmail.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] drm/vkms: Add drm_dev_enter/exit guards for hot-removable paths
Date: Thu, 5 Nov 2026 18:36:44 +0000 [thread overview]
Message-ID: <20261105183644.188127-1-oaroraetimis@gmail.com> (raw)
In-Reply-To: <20261031225901.3200167-1-sebastian.wick@redhat.com>
Whoops, May I ask about one path.
> 2. Conversely, if struct drm_device is still kept alive by an open
> /dev/dri/card<N> fd when crc/data is closed after drm_dev_unplug() sets
> dev->unplugged = true, drm_dev_enter(crtc->dev, &idx) in
> vkms_set_crc_source(crtc, NULL) will return false and exit early with
> -ENODEV. Doesn't that skip vkms_set_composer(out, false), leaving
> out->composer_enabled set to true and leaking the vblank reference from
> drm_crtc_vblank_put(&out->crtc)?
I followed it and think it really holds. And this issue was introduced by this patch.
drivers/gpu/drm/vkms/vkms_composer.c:vkms_set_crc_source() {
if (!drm_dev_enter(crtc->dev, &idx))
return -ENODEV;
ret = vkms_crc_parse_source(src_name, &enabled);
vkms_set_composer(out, enabled);
}
I understand the guard is meant to reject new operations after unplug. However, since closing the CRC file is a cleanup path, skipping vkms_set_composer(out, false) seems like it would leak the vblank reference.
Thank you,
Oarora Etimis
prev parent reply other threads:[~2026-11-05 18:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 22:58 Sebastian Wick
2026-10-31 22:58 ` [PATCH 2/2] drm/vkms: Use drm_dev_unplug() for ConfigFS device removal Sebastian Wick
2026-11-05 15:56 ` Maxime Ripard
2026-11-05 18:36 ` Oarora Etimis
2026-11-05 18:36 ` Oarora Etimis [this message]
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=20261105183644.188127-1-oaroraetimis@gmail.com \
--to=oaroraetimis@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=louis.chauvet@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=melissa.srw@gmail.com \
--cc=mripard@kernel.org \
--cc=sebastian.wick@redhat.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 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®