* [bug report] drm/sysfb: Add custom plane state
@ 2025-10-17 8:49 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2025-10-17 8:49 UTC (permalink / raw)
To: Thomas Zimmermann; +Cc: dri-devel
Hello Thomas Zimmermann,
Commit e45f72b6782f ("drm/sysfb: Add custom plane state") from Sep
18, 2025 (linux-next), leads to the following Smatch static checker
warning:
drivers/gpu/drm/sysfb/drm_sysfb_modeset.c:434 drm_sysfb_plane_reset()
error: NULL dereference inside function __drm_gem_reset_shadow_plane()
drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
424 {
425 struct drm_sysfb_plane_state *sysfb_plane_state;
426
427 if (plane->state)
428 drm_sysfb_plane_state_destroy(to_drm_sysfb_plane_state(plane->state));
429
430 sysfb_plane_state = kzalloc(sizeof(*sysfb_plane_state), GFP_KERNEL);
431 if (sysfb_plane_state)
432 __drm_gem_reset_shadow_plane(plane, &sysfb_plane_state->base);
433 else
--> 434 __drm_gem_reset_shadow_plane(plane, NULL);
^^^^
Passing a NULL here will crash. (It's the second line where we call
drm_format_conv_state_init() that's the problem).
435 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-10-17 8:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17 8:49 [bug report] drm/sysfb: Add custom plane state Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox