Skip to content

Commit 3b32b7f

Browse files
Su Huibbrezillon
authored andcommitted
drm/panthor: avoid garbage value in panthor_ioctl_dev_query()
'priorities_info' is uninitialized, and the uninitialized value is copied to user object when calling PANTHOR_UOBJ_SET(). Using memset to initialize 'priorities_info' to avoid this garbage value problem. Fixes: f70000e ("drm/panthor: Add DEV_QUERY_GROUP_PRIORITIES_INFO dev query") Signed-off-by: Su Hui <[email protected]> Reviewed-by: Dan Carpenter <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Reviewed-by: Steven Price <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 02458fb commit 3b32b7f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/panthor/panthor_drv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ static void panthor_query_group_priorities_info(struct drm_file *file,
802802
{
803803
int prio;
804804

805+
memset(arg, 0, sizeof(*arg));
805806
for (prio = PANTHOR_GROUP_PRIORITY_REALTIME; prio >= 0; prio--) {
806807
if (!group_priority_permit(file, prio))
807808
arg->allowed_mask |= BIT(prio);

0 commit comments

Comments
 (0)