Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

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@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215171549.16305-1-alsp705@gmail.com

authored by

Alexandr Sapozhnikov and committed by
Thomas Zimmermann
7245e629 a950b989

+1 -1
+1 -1
drivers/gpu/drm/tiny/cirrus.c
··· 455 455 if (state->fb && cirrus->cpp != cirrus_cpp(state->fb)) 456 456 cirrus_mode_set(cirrus, &crtc->mode, state->fb); 457 457 458 - if (drm_atomic_helper_damage_merged(old_state, state, &rect)) 458 + if (state->fb && drm_atomic_helper_damage_merged(old_state, state, &rect)) 459 459 cirrus_fb_blit_rect(state->fb, &shadow_plane_state->data[0], &rect); 460 460 } 461 461