From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chintan Patel <chintanlike@gmail.com>,
maarten.lankhorst@linux.intel.com, maxime.ripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
syzbot+147ba789658184f0ce04@syzkaller.appspotmail.com,
Chintan Patel <chintanlike@gmail.com>
Subject: Re: [PATCH v3] drm/vblank: downgrade vblank wait timeout from WARN to error
Date: Fri, 03 Oct 2025 14:11:15 +0300 [thread overview]
Message-ID: <5871956eef6c89f8361faae84c515c0e8356fc71@intel.com> (raw)
In-Reply-To: <20251003032303.16518-1-chintanlike@gmail.com>
On Thu, 02 Oct 2025, Chintan Patel <chintanlike@gmail.com> wrote:
> When wait_event_timeout() in drm_wait_one_vblank() times out, the
> current WARN can cause unnecessary kernel panics in environments
> with panic_on_warn set (e.g. CI, fuzzing). These timeouts can happen
> under heavy scheduling pressure or in rare cases of delayed vblank
> handling, and are not always a kernel bug.
>
> Replace the WARN with drm_err() messages that report the timeout
> without crashing the system. Developers can still enable drm.debug
> to diagnose genuine problems.
No need to resend for this, can be fixed while applying, but the last
sentence is no longer meaningful with drm_err().
BR,
Jani.
>
> Reported-by: syzbot+147ba789658184f0ce04@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=147ba789658184f0ce04
> Tested-by: syzbot+147ba789658184f0ce04@syzkaller.appspotmail.com
> Signed-off-by: Chintan Patel <chintanlike@gmail.com>
>
> v2:
> - Drop unnecessary in-code comment (suggested by Thomas Zimmermann)
> - Remove else branch, only log timeout case
>
> v3:
> - Use drm_err() instead of drm_dbg_kms() (suggested by Ville Syrjälä)
> - Remove unnecessary curr = drm_vblank_count() (suggested by Thomas Zimmermann)
> - Fix commit message wording (“invalid userspace calls” → “delayed vblank handling”)
> ---
> drivers/gpu/drm/drm_vblank.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> index 46f59883183d..0664aea1b924 100644
> --- a/drivers/gpu/drm/drm_vblank.c
> +++ b/drivers/gpu/drm/drm_vblank.c
> @@ -1305,7 +1305,8 @@ void drm_wait_one_vblank(struct drm_device *dev, unsigned int pipe)
> last != drm_vblank_count(dev, pipe),
> msecs_to_jiffies(100));
>
> - drm_WARN(dev, ret == 0, "vblank wait timed out on crtc %i\n", pipe);
> + if (!ret)
> + drm_err(dev, "vblank wait timed out on crtc %i\n", pipe);
>
> drm_vblank_put(dev, pipe);
> }
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-10-03 11:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-03 3:23 [PATCH v3] drm/vblank: downgrade vblank wait timeout from WARN to error Chintan Patel
2025-10-03 11:11 ` Jani Nikula [this message]
2025-10-23 7:51 ` Thomas Zimmermann
2025-10-24 13:58 ` Thomas Zimmermann
2025-10-24 23:40 ` Chintan Patel
2025-10-27 8:49 ` Thomas Zimmermann
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=5871956eef6c89f8361faae84c515c0e8356fc71@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=chintanlike@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=maxime.ripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=syzbot+147ba789658184f0ce04@syzkaller.appspotmail.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