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 <[email protected]> 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/[email protected]?part=1
