From: sashiko-bot@kernel.org
To: "Leandro Ribeiro" <leandro.ribeiro@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/1] drm: use drm_warn() in validate_blend_mode_for_alpha_formats()
Date: Wed, 29 Jul 2026 21:55:28 +0000 [thread overview]
Message-ID: <20260729215528.D6EFF1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260729214505.185776-2-leandro.ribeiro@collabora.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Unconditional dereference of `drm_format_info()` return value leads to NULL pointer dereference for unrecognized formats.
--
--- Patch [1]: [PATCH 1/1] drm: use drm_warn() in validate_blend_mode_for_alpha_formats() ---
commit 8bcc8b572cfd0496af9f1e8dd202524f50670fa0
Author: Leandro Ribeiro <leandro.ribeiro@collabora.com>
drm: use drm_warn() in validate_blend_mode_for_alpha_formats()
This commit replaces WARN() with drm_warn() in
validate_blend_mode_for_alpha_formats() to prevent fuzzers from tripping
over kernel warning reports for expected driver validation issues.
> diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
> index 3bcc7bf0900c4..3d9c554e08a87 100644
> --- a/drivers/gpu/drm/drm_mode_config.c
> +++ b/drivers/gpu/drm/drm_mode_config.c
> @@ -869,8 +869,9 @@ static void validate_blend_mode_for_alpha_formats(struct drm_plane *plane)
> for (i = 0; i < plane->format_count; i++) {
> fmt = drm_format_info(plane->format_types[i]);
> if (fmt->has_alpha) {
[Severity: High]
This is a pre-existing issue, but could this unconditionally dereference
fmt if drm_format_info() returns NULL?
If a driver exposes an unrecognized or custom pixel format that the core
DRM does not know about, drm_format_info() returns NULL. Since the
purpose of this validation function is to catch driver bugs, should we
check if fmt is NULL before checking fmt->has_alpha to avoid a kernel
panic?
> - WARN(1, "[PLANE:%d:%s] pixel format with alpha exposed but blend mode not setup",
> - plane->base.id, plane->name);
> + drm_warn(plane->dev,
> + "[PLANE:%d:%s] pixel format with alpha exposed but blend mode not setup",
> + plane->base.id, plane->name);
> break;
> }
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260729214505.185776-2-leandro.ribeiro@collabora.com?part=1
next prev parent reply other threads:[~2026-07-29 21:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 21:45 [PATCH 0/1] drm: use drm_warn() in validate_blend_mode_for_alpha_formats() Leandro Ribeiro
2026-07-29 21:45 ` [PATCH 1/1] " Leandro Ribeiro
2026-07-29 21:55 ` sashiko-bot [this message]
2026-07-29 22:13 ` Tetsuo Handa
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=20260729215528.D6EFF1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=leandro.ribeiro@collabora.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.