* [PATCH v2] drm/fbdev-shmem: don't warn on a transient dirty callback failure
@ 2026-11-11 4:41 Jiahao Xu
2026-11-11 11:36 ` Thomas Zimmermann
0 siblings, 1 reply; 2+ messages in thread
From: Jiahao Xu @ 2026-11-11 4:41 UTC (permalink / raw)
To: Thomas Zimmermann, dri-devel
Cc: Maarten Lankhorst, Maxime Ripard, David Airlie, Simona Vetter,
linux-kernel, syzbot+369ee6a6e9d0bbf14b37, xujiahao
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.
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;
}
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v2] drm/fbdev-shmem: don't warn on a transient dirty callback failure
2026-11-11 4:41 [PATCH v2] drm/fbdev-shmem: don't warn on a transient dirty callback failure Jiahao Xu
@ 2026-11-11 11:36 ` Thomas Zimmermann
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Zimmermann @ 2026-11-11 11:36 UTC (permalink / raw)
To: Jiahao Xu, dri-devel
Cc: Maarten Lankhorst, Maxime Ripard, David Airlie, Simona Vetter,
linux-kernel, syzbot+369ee6a6e9d0bbf14b37
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-11 11:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 4:41 [PATCH v2] drm/fbdev-shmem: don't warn on a transient dirty callback failure Jiahao Xu
2026-11-11 11:36 ` Thomas Zimmermann
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®