[PATCH weston] compositor-drm: Stop sending uninit data to the kernel

Quentin Glidic sardemff7+wayland at sardemff7.net
Mon Aug 15 15:38:39 UTC 2016


On 09/07/2016 05:40, Yong Bakos wrote:
> On Jul 8, 2016, at 10:50 AM, Derek Foreman <derekf at osg.samsung.com> wrote:
>>
>> Valgrind noticed that we send uninit data to drmModeAddFB2.  While
>> the kernel should never read this (because of the plane format),
>> it's probably still nicer to zero the data before we send it.
>>
>> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
>
> Reviewed-by: Yong Bakos <ybakos at humanoriented.com>
>
> What about the similar array decs within drm_fb_create_dumb?

Follow-up?

Pushed this one:
b40b827..482ffdf  master -> master

Cheers,


>
>> ---
>> libweston/compositor-drm.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
>> index f903a3b..be6652e 100644
>> --- a/libweston/compositor-drm.c
>> +++ b/libweston/compositor-drm.c
>> @@ -381,7 +381,7 @@ drm_fb_get_from_bo(struct gbm_bo *bo,
>> {
>> 	struct drm_fb *fb = gbm_bo_get_user_data(bo);
>> 	uint32_t width, height;
>> -	uint32_t handles[4], pitches[4], offsets[4];
>> +	uint32_t handles[4] = { 0 }, pitches[4] = { 0 }, offsets[4] = { 0 };
>> 	int ret;
>>
>> 	if (fb)
>> --
>> 2.8.1
>>
>> _______________________________________________
>> wayland-devel mailing list
>> wayland-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>


-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list