Patch "drm/cirrus: NULL-check pipe->plane.state->fb in cirrus_pipe_update()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/cirrus: NULL-check pipe->plane.state->fb in cirrus_pipe_update()

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-cirrus-null-check-pipe-plane.state-fb-in-cirrus_.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1ddf2479fec38bc565eef5e68f3112a3f346bc1a
Author: Alexandr Sapozhnikov <alsp705@xxxxxxxxx>
Date:   Wed Feb 15 20:15:49 2023 +0300

    drm/cirrus: NULL-check pipe->plane.state->fb in cirrus_pipe_update()
    
    [ Upstream commit 7245e629dcaaf308f1868aeffa218e9849c77893 ]
    
    After having been compared to NULL value at cirrus.c:455, pointer
    'pipe->plane.state->fb' is passed as 1st parameter in call to function
    'cirrus_fb_blit_rect' at cirrus.c:461, where it is dereferenced at
    cirrus.c:316.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    v2:
            * aligned commit message to line-length limits
    
    Signed-off-by: Alexandr Sapozhnikov <alsp705@xxxxxxxxx>
    Reviewed-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
    Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230215171549.16305-1-alsp705@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/tiny/cirrus.c b/drivers/gpu/drm/tiny/cirrus.c
index 354d5e854a6f0..b27e469e90217 100644
--- a/drivers/gpu/drm/tiny/cirrus.c
+++ b/drivers/gpu/drm/tiny/cirrus.c
@@ -455,7 +455,7 @@ static void cirrus_pipe_update(struct drm_simple_display_pipe *pipe,
 	if (state->fb && cirrus->cpp != cirrus_cpp(state->fb))
 		cirrus_mode_set(cirrus, &crtc->mode, state->fb);
 
-	if (drm_atomic_helper_damage_merged(old_state, state, &rect))
+	if (state->fb && drm_atomic_helper_damage_merged(old_state, state, &rect))
 		cirrus_fb_blit_rect(state->fb, &shadow_plane_state->data[0], &rect);
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux