From: Thomas Zimmermann <tzimmermann@suse.de>
To: Jiahao Xu <xujiahao@cmss.chinamobile.com>,
dri-devel@lists.freedesktop.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
linux-kernel@vger.kernel.org,
syzbot+369ee6a6e9d0bbf14b37@syzkaller.appspotmail.com
Subject: Re: [PATCH v2] drm/fbdev-shmem: don't warn on a transient dirty callback failure
Date: Wed, 11 Nov 2026 12:36:39 +0100 [thread overview]
Message-ID: <e16d5fb8-58bb-48dd-8f98-6777bd2fd2e3@suse.de> (raw)
In-Reply-To: <20261111124156.317053-1-xujiahao@cmss.chinamobile.com>
Am 11.11.26 um 05:41 schrieb Jiahao Xu:
> The fbdev dirty callback (drm_atomic_helper_dirtyfb()) can fail with
> -ENOMEM when the atomic commit allocation fails under memory pressure.
> That is a transient runtime condition, not a driver bug: the damage is
> only cosmetic and the frame is redrawn on the next flush.
Cosmetic? Failing to allocate memory seems like a significant problem to me.
>
> drm_WARN_ONCE() turns this recoverable failure into a WARN splat (and a
> panic with panic_on_warn), which syzbot keeps reporting:
>
> virtio-pci 0000:00:01.0: [drm] Dirty helper failed: ret=-12
> WARNING: drivers/gpu/drm/drm_fbdev_shmem.c:118 at ...
>
> Keep the warning for other failures, but do not warn about -ENOMEM. The
> error is still propagated to the caller.
>
> Fixes: 150f431a0831 ("drm/fbdev: Add fbdev-shmem")
> Reported-by: syzbot+369ee6a6e9d0bbf14b37@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=369ee6a6e9d0bbf14b37
> Signed-off-by: Jiahao Xu <xujiahao@cmss.chinamobile.com>
> ---
> v2:
> - Add the Fixes: tag reported by sashiko-bot. No code change.
> ---
> drivers/gpu/drm/drm_fbdev_shmem.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_fbdev_shmem.c b/drivers/gpu/drm/drm_fbdev_shmem.c
> index 8eb05fe9b..c3fa5a663 100644
> --- a/drivers/gpu/drm/drm_fbdev_shmem.c
> +++ b/drivers/gpu/drm/drm_fbdev_shmem.c
> @@ -115,7 +115,14 @@ static int drm_fbdev_shmem_helper_fb_dirty(struct drm_fb_helper *helper,
>
> if (helper->fb->funcs->dirty) {
> ret = helper->fb->funcs->dirty(helper->fb, NULL, 0, 0, clip, 1);
> - if (drm_WARN_ONCE(dev, ret, "Dirty helper failed: ret=%d\n", ret))
> + /*
> + * An allocation failure is a transient condition under memory
> + * pressure, not a driver bug, so don't warn about it. The
> + * error itself is still propagated to the caller.
> + */
> + drm_WARN_ONCE(dev, ret && ret != -ENOMEM,
> + "Dirty helper failed: ret=%d\n", ret);
> + if (ret)
> return ret;
> }
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG Nürnberg)
prev parent reply other threads:[~2026-11-11 11:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 4:41 Jiahao Xu
2026-11-11 11:36 ` Thomas Zimmermann [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=e16d5fb8-58bb-48dd-8f98-6777bd2fd2e3@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=syzbot+369ee6a6e9d0bbf14b37@syzkaller.appspotmail.com \
--cc=xujiahao@cmss.chinamobile.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 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®