2022-04-16 01:40:55

by Tales Aparecida

[permalink] [raw]
Subject: [PATCH v2 1/2] drm/vkms: check plane_composer->map[0] before using it

Fix a copypasta error. The caller of compose_plane() already checks
primary_composer->map. In contrast, plane_composer->map is never
verified here before handling.

Fixes: 7938f4218168 ("dma-buf-map: Rename to iosys-map")
Reviewed-by: AndrĂ© Almeida <[email protected]>
Signed-off-by: Tales Lelo da Aparecida <[email protected]>
---
v2: detail the commit message with more information

drivers/gpu/drm/vkms/vkms_composer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c
index c6a1036bf2ea..b47ac170108c 100644
--- a/drivers/gpu/drm/vkms/vkms_composer.c
+++ b/drivers/gpu/drm/vkms/vkms_composer.c
@@ -157,7 +157,7 @@ static void compose_plane(struct vkms_composer *primary_composer,
void *vaddr;
void (*pixel_blend)(const u8 *p_src, u8 *p_dst);

- if (WARN_ON(iosys_map_is_null(&primary_composer->map[0])))
+ if (WARN_ON(iosys_map_is_null(&plane_composer->map[0])))
return;

vaddr = plane_composer->map[0].vaddr;
--
2.35.1


2022-06-13 09:47:55

by Melissa Wen

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] drm/vkms: check plane_composer->map[0] before using it

On 04/15, Tales Lelo da Aparecida wrote:
> Fix a copypasta error. The caller of compose_plane() already checks
> primary_composer->map. In contrast, plane_composer->map is never
> verified here before handling.
>
> Fixes: 7938f4218168 ("dma-buf-map: Rename to iosys-map")
> Reviewed-by: Andr? Almeida <[email protected]>
> Signed-off-by: Tales Lelo da Aparecida <[email protected]>
> ---
> v2: detail the commit message with more information
>
> drivers/gpu/drm/vkms/vkms_composer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c
> index c6a1036bf2ea..b47ac170108c 100644
> --- a/drivers/gpu/drm/vkms/vkms_composer.c
> +++ b/drivers/gpu/drm/vkms/vkms_composer.c
> @@ -157,7 +157,7 @@ static void compose_plane(struct vkms_composer *primary_composer,
> void *vaddr;
> void (*pixel_blend)(const u8 *p_src, u8 *p_dst);
>
> - if (WARN_ON(iosys_map_is_null(&primary_composer->map[0])))
> + if (WARN_ON(iosys_map_is_null(&plane_composer->map[0])))
> return;

I cherry-picked this one and applied to drm-misc-next.

Thanks,

Melissa

>
> vaddr = plane_composer->map[0].vaddr;
> --
> 2.35.1
>


Attachments:
(No filename) (1.23 kB)
signature.asc (849.00 B)
Download all attachments