From: Greg KH <gregkh@linuxfoundation.org>
To: Pranav Tyagi <pranav.tyagi03@gmail.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
rodrigosiqueiramelo@gmail.com, melissa.srw@gmail.com,
hamohammed.sa@gmail.com, daniel@ffwll.ch, airlied@linux.ie,
mcanal@igalia.com, arthurgrillo@riseup.net,
mairacanal@riseup.net, skhan@linuxfoundation.org,
linux-kernel-mentees@lists.linux.dev, stable@vger.kernel.org,
sashal@kernel.org
Subject: Re: [PATCH] drm/vkms: Fix race-condition between the hrtimer and the atomic commit
Date: Thu, 26 Jun 2025 15:57:21 +0100 [thread overview]
Message-ID: <2025062607-hardener-splotchy-1e70@gregkh> (raw)
In-Reply-To: <20250626142243.19071-1-pranav.tyagi03@gmail.com>
On Thu, Jun 26, 2025 at 07:52:43PM +0530, Pranav Tyagi wrote:
> From: Maíra Canal <mcanal@igalia.com>
>
> [ Upstream commit a0e6a017ab56936c0405fe914a793b241ed25ee0 ]
>
> Currently, it is possible for the composer to be set as enabled and then
> as disabled without a proper call for the vkms_vblank_simulate(). This
> is problematic, because the driver would skip one CRC output, causing CRC
> tests to fail. Therefore, we need to make sure that, for each time the
> composer is set as enabled, a composer job is added to the queue.
>
> In order to provide this guarantee, add a mutex that will lock before
> the composer is set as enabled and will unlock only after the composer
> job is added to the queue. This way, we can have a guarantee that the
> driver won't skip a CRC entry.
>
> This race-condition is affecting the IGT test "writeback-check-output",
> making the test fail and also, leaking writeback framebuffers, as the
> writeback job is queued, but it is not signaled. This patch avoids both
> problems.
>
> [v2]:
> * Create a new mutex and keep the spinlock across the atomic commit in
> order to avoid interrupts that could result in deadlocks.
>
> [ Backport to 5.15: context cleanly applied with no semantic changes.
> Build-tested. ]
Did you forget about 6.1.y?
confused,
greg k-h
next prev parent reply other threads:[~2025-06-26 14:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 14:22 [PATCH] drm/vkms: Fix race-condition between the hrtimer and the atomic commit Pranav Tyagi
2025-06-26 14:57 ` Greg KH [this message]
2025-06-26 15:08 ` Pranav Tyagi
2025-06-26 15:02 ` Maíra Canal
2025-06-26 15:10 ` Pranav Tyagi
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=2025062607-hardener-splotchy-1e70@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=airlied@linux.ie \
--cc=arthurgrillo@riseup.net \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mairacanal@riseup.net \
--cc=mcanal@igalia.com \
--cc=melissa.srw@gmail.com \
--cc=pranav.tyagi03@gmail.com \
--cc=rodrigosiqueiramelo@gmail.com \
--cc=sashal@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=stable@vger.kernel.org \
/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