mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
drm/panic: Fix uninitialized drm_scanout_buffer.set_pixel() crash
No implementations of drm_plane_helper_funcs.get_scanout_buffer() fill
in the optional drm_scanout_buffer.set_pixel() member. Hence the member
may contain non-zero garbage, causing a crash when deferencing it during
drm panic.
Fix this by pre-initializing the drm_scanout_buffer object before
calling drm_plane_helper_funcs.get_scanout_buffer().
Fixes: 24d07f114e
("drm/panic: Add a set_pixel() callback to drm_scanout_buffer")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/4c250d21880ca0b97e41da7b6a101bdf07e9d015.1718305355.git.geert+renesas@glider.be
This commit is contained in:
parent
07430fa524
commit
a63ee07883
@ -582,7 +582,7 @@ static void draw_panic_dispatch(struct drm_scanout_buffer *sb)
|
||||
|
||||
static void draw_panic_plane(struct drm_plane *plane)
|
||||
{
|
||||
struct drm_scanout_buffer sb;
|
||||
struct drm_scanout_buffer sb = { };
|
||||
int ret;
|
||||
unsigned long flags;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user